Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.2.0
-
Fix Version/s: UDIG 1.2.1
-
Component/s: visualization using map layer and style
-
Labels:None
Description
Follow on to UDIG-1660 - the user interface exists to allow the user to indicate "Cache" or not. Right now GridCoverageLoader always loads things into memory, this improvement request is to allow the use of GridCoverageLoader when the cache is on; and if it is off make use of the normal GridCoverageReader functionality out of GeoTools.
With respect to the initial commit:
I have a patch incoming that turns off loading the image into memory by default (unless it is a jpeg).
And wow does it make a difference; for geotiff bluemarble in the default dataset the performance difference is like night and day. Not the image is still cached in a a JAI tileset - where it can do a decent job of lazy loading etc.
To help with this I have made a new render metrics context DRAW_IMAGE_COMPRESSED used to indicate problem formats like jpeg where drawing from disk is slowed by the requirement to read everything.
Actually using the gridcoveragereader even with jpeg is pretty darn amazing; I can now load my massive jpeg test image that fails with the GridCoverageLoader. And performance is way better then I remember it.
Could it be the the change to storing the JAI TileCache on the layer context is acting as a better version of loading an image into memory then is provided by GridCoverageLoader?
I have asked Jesse to review the following glitch:
Hi Jesse; I asked for a review above - but did not provide any hints
as to where.
Good starting points:
- The two render metrics implementations for GridReaderRenderMentrics
and GridCoverageRenderMetrics - CacheStyleContent
I have one glitch which perhaps you could answer? Right now when jpeg
is cached by default it works well. When I turn off the cache using
the Style editor the value changes; but I expect it is still rendering
from memory. When I close and open the map it is obviously not
rendering from memory. And yes I verified with the debugger.
So the question is - once the grid loader has pulled the image into
memory; what steps can be taken to remove it and have the other
renderer selected? We don't really have any kind of hook to clear
things out when they are no longer used.
Ideas:
- do we need to adjust the cache style configurator to huntdown and
remove the blackboard entry? - is the renderer choice being maintained between runs? If so can we
clear that when when the style blackboard has received a change (or do
something smarter such as only clear the choice if more then one
renderer is available for the choice).
Issue Links
- depends upon
-
UDIG-1660
User control of Feature Caching
-