Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-05 Thread Michael Bedward
On 5 July 2011 17:32, Andrea Aime wrote: > Or are you already the one? :-) Me ???!!! I think not :-) Michael -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive r

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-05 Thread Andrea Aime
On Tue, Jul 5, 2011 at 9:14 AM, Michael Bedward wrote: > Hi Andrea, > > > On the fly compilation of classes will put the results in the permanent > > generation, > > depending on the garbage collector chosen it will result in a memory leak > in > > the permanent generation (once put there there mi

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-05 Thread Michael Bedward
Hi Andrea, > On the fly compilation of classes will put the results in the permanent > generation, > depending on the garbage collector chosen it will result in a memory leak in > the permanent generation (once put there there might be no way to reclaim > them). > This actually depends on what hap

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Andrea Aime
On Tue, Jul 5, 2011 at 5:52 AM, Michael Bedward wrote: > Hi again Andrea, > > Jody and I chatted on IRC a while ago about how using these functions > with rasters and how bad this would be :) We were talking in > particular about InterpolateFunction and wondered about compiling the > interpolatio

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Jody Garnett
When he says we it is more that he hurt my mind talking about byte code and I ran and hid in a corner. I actually think it is really and interesting idea; but would love to see some benchmarking to justify the complexity / effort / magic. Jody On Tue, Jul 5, 2011 at 1:52 PM, Michael Bedward wrote

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Michael Bedward
Hi again Andrea, Jody and I chatted on IRC a while ago about how using these functions with rasters and how bad this would be :) We were talking in particular about InterpolateFunction and wondered about compiling the interpolation expression to bytecode using Janino. What do you think ? Michael

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Michael Bedward
On 4 July 2011 20:26, Andrea Aime wrote: > I looked into the SE spec for RasterSymbolizer, it uses the Categorize > function > and the Interpolate one, not the Recode one. Section 11.6.4 of the specs (05-077_Symbology_Encoding_Implementation_Specification.pdf) includes Recode along with Interpola

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Andrea Aime
On Mon, Jul 4, 2011 at 12:08 PM, Jody Garnett wrote: > That would be great Andrea; making it actually work fast is required > before we use it on rasters. I do not know why the code is case insensitive. > Working on rasters... hmmm... does not make sense to me, for the raster case it should be r

Re: [Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Jody Garnett
That would be great Andrea; making it actually work fast is required before we use it on rasters. I do not know why the code is case insensitive. -- Jody Garnett On Monday, 4 July 2011 at 8:04 PM, Andrea Aime wrote: > Hi, > I'm looking into optimizing the recode function for the case where al

[Geotools-devel] Optimizing (and maybe fixing) the recode function

2011-07-04 Thread Andrea Aime
Hi, I'm looking into optimizing the recode function for the case where all keys and values are literals. It seems to me the simplest choice is to build a hashmap in the constructor that maps between keys and values and then use it in the evaluate, it would be the fastest option available I think.