uDIG
  1. uDIG
  2. UDIG-1717

User Control of Raster Caching

    Details

      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

          Activity

          Hide
          Jody Garnett added a comment -
          Jesse can you review; or create a new issue to review switching between GridCoverageRenderer and GridReaderRenderer.
          Show
          Jody Garnett added a comment - Jesse can you review; or create a new issue to review switching between GridCoverageRenderer and GridReaderRenderer.

            People

            • Assignee:
              Jesse Eichar
              Reporter:
              Jody Garnett
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: