-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems like the imageio uses more memory than needed #17
Comments
Seconded. Writing three 150 MB files somehow needs 4-5 GB. |
Seconded. An error sample going out of memory using SCIFIO-ITK bridge.
|
For performance, Bio-Formats supports passing a preallocated byte buffer. Let's definitely do this whenever possible, instead of getting back a newly allocated buffer (of the exact same size) every time. Might help some with scifio/scifio-imageio#17.
I pushed a small performance improvement for reading. But it won't affect the writing performance. There is surely more going on here than just lack of buffer reuse. Best would be to profile the Java-side code. @hinerm has mad skills there—but finding the time is another issue... |
I guess this is still relevant? Did somebody follow this up further? In a similar benchmark with Java 1.6.0 and BioFormats 4.x I have found that the JVM can accommodate with significantly less memory if low limits are imposed already during startup. It seems that the JVM can make excessive use of memory when no tight limits are set, or at least it seems its not calling the garbage collector frequently enough. Of course this policy of low initial limits has the flaw that if the limit is too low, the execution will eventually fail. The best policy I could come up with was to test with continuously growing memory limits until the image writing would work. |
Needed over 3 gigs of memory to convert one plane of a 1.3 GB ome.tiff dataset.
The text was updated successfully, but these errors were encountered: