• New Feature
  • Status: Open
  • 2 Major
  • Resolution:
  • prodmgmt
  • Reporter:
  • September 21, 2009
  • 0
  • Watchers: 0
  • March 11, 2010


[email protected] www.ktb-systeme.de

We came across a problem where the cache performance degraded because the disk-spooler would write back unmodified elements.

We have written java based PDF-page cache for an touchscreen appliance for commercial pilots. So when a user opens our pdf-viewer we fill up the cache with BufferedImages and place them in a cache. Those pages are not supposed to change over time - and if a new pdf comes in we would recreate the complete cache for that pdf.

So our objects in the cache are “immutable” - they will never change once created. But when the user steps through the pages old pages will be put to the disk store, serialized again and written back to the disk.

It would be nice to have an option where i could state that cache-elements are immutable and should only be serialized and written back when they were actually replaced in the cache (or expired) - therefore avoiding unnecessary serialisation & disk-access. That could speed up caches with backing disk-stores dramatically.

Of course that should not be the default - but it would be a nice feature.

As (a quasi automatic) option it could be possible to serialize, create a rather safe hash from the bytestream and the decide if writing the data to the store file is necessary. A tradeoff should be made between the cost of the hash and the cost of disk-access.

Those option could speed up the cache when under stress since IO would only occur when needed.

Sourceforge Ticket ID: 1609912 - Opened By: nobody - 6 Dec 2006 08:35 UTC