How to create a test case for the FIJI caching strategy of large image files

I am working on a plugin for non-linear image registration. When running the plugin (showDialog()) from within Eclipse with example images loaded via the imagej1 io Opener, it works without a problem. However, when I start the plugin from within FIJI I run into memory issues with large files. The main image structures I use are PlanarImg and ImagePlusImg.
My assumption is that this has something to do with the way ImageJ does caching of large images and I want to create a test case, such that I can isolate the problem and find the functions, where I might be handling cell images or virtual stacks wrongly.
Is there some ressource on how ImageJ does caching without the need to go through the source code or can somebody give me a hint on how to create a test case that would reproduce the way in which ImageJ handles large files? Also, maybe somebody has suggestions on how to start or where to look when debuggin different behaviour between the developing environment and ImageJ?