Hi Remi, We routinely plot hundreds of thousands of features - this can take the StreamingRenderer 5 or 6 seconds. However we have a test that uses a two-asset feature collection - read from a CSV file - to create a 400x300px image - quite similar to your setup. I timed this and StreamingRenderer completes rendering in around 110 ms. I increased the number of features to 20 and rendering time was not significantly different.
Replacing this with an empty feature collection, rendering consistently takes around 90ms So for me the difference between no features and a few features is 20ms, not 4s as you are experiencing. Are you sure that your latency is not to do with data retrieval? As an additional test, could you try copying your 40 features to a ListFeatureCollection first and rendering from that - and just time the rendering step to ensure that it is not H2 that is causing the slowdown? Otherwise, can you provide a code snippet that could be used to reproduce your situation? I'd be happy to reproduce your situation and try to help. Good luck! Iain On 23/12/2016 5:02 a.m., Rémi Pace wrote: > Hi list ! > > I use StreamingRenderer to generate fixed-size images (500/500px) > which are cached in an H2 database and updated when needed. It works > well, but performances are random. I searched low code and all is > around StreamingRenderer. > > On an empty feature layer, first images are produced in 50 or 100ms > but with just 30 or 40 features it go up to 4 seconds (sometimes 20 > seconds) for each small picture (500 x 500px) > > However, raster data is displayed on background in the same time in > just 20 or 50 ms. And this data is extracted from H2 database too. > > I think the only weird thing in my code is that the coordinates are a > bit fanciful (like in a CAD) with points like 172/190 2000/2100, ... > but I am using the GENERIC_2D CRS. > > I tried to play on Rendering Hints without success. I tried in debug > mode and without, nothing changed. I usually run OpenJDK 1.8 but I > tried on Oracle 1.8, it seems a bit better but it is always about 2s. > > Someone know how can I fix that ? Thanks for your help ! > -- Sent from my ZX80 --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus ------------------------------------------------------------------------------ Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today.http://sdm.link/intel _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users