openmicroscopy/openmicroscopy — pull request #1058 by joshmoore (2013-04-17 23:24:31+00:00)
Title: Fs file caching (#10535)

Makes use of the new `loci.formats.Memoizer` class to cache all calls to `IFormatReader.setId()` on the server-side. The intent is that quick calls to the server from web (panning over a large image, etc) should incur lower cost per call.

Memo files are created under `/tmp/memo` (or similar), e.g.
```
$ find /tmp/memo -name "*.bfmemo"
/tmp/memo/OMERO/ManagedRepository/root_0/2013-04/17/12-34-02.906/.3D-CONFOCAL-PSF-235nm.msr.bfmemo
```

Loading the memo file is usually under 100ms, while calls to `setId()` can be several seconds. (`Memoizer` skips caching when `setId()` is faster than 100ms).

Critical for testing is a breadth of file formats because the contents of each `Reader` may or may not cause serialization issues. A single (unused) field in the `OBFReader`, for example, was able to crash the JVM.

See:
* https://trac.openmicroscopy.org.uk/ome/ticket/10535
* https://github.com/openmicroscopy/bioformats/pull/465