Simone, Andrea,
You mentioned that you decided against using a ThreadLocal field in
RangeLookupTable in favour of caching within the ImageOp class. What
were the reasons for that ?
Hi Andrea,
Yuk... I see. Certainly sounds painful.
Trying to think laterally... What about if the table has a method to
lookup multiple values, perhaps like:
public List<U> getDestValues( List<T> srcValues )
If that was called per tile row (for example), source value caching
could be done with a local var in the method.
Yep - this is essentially what Simone implemented. So the table
functions as just a collection of range / value tuples (LookupItems)
So, then I start to think do we need the table class at all ? The
alternative would be the client constructing a Collection of
LookupItems and passing this as a parameter to the operator. But I
guess the table (or now, the table Builder class) at least takes care
of handling the case where overlapping lookup ranges are added which
lightens the load for client code.
Thanks for the input - very helpful. I'll commit some new code tomorrow.
I have the indexed search in my todo (wish?) list.
At a certain point I want to replace some code in the rastersymbolizer and I really need this has we might thousands of lookup items.
--