Skip to content
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

Memo directory setting not being applied properly #238

Closed
DavidStirling opened this issue Jan 22, 2024 · 2 comments · Fixed by #240
Closed

Memo directory setting not being applied properly #238

DavidStirling opened this issue Jan 22, 2024 · 2 comments · Fixed by #240

Comments

@DavidStirling
Copy link
Member

DavidStirling commented Jan 22, 2024

Running the following command:

/Users/david/Downloads/bioformats2raw-0.9.0/bin/bioformats2raw 
/Users/david/Downloads/ngff-con-testing/source/image.png 
/Users/david/Downloads/ngff-con-testing/dest/test.zarr 
--keep-memo-files 
--memo-directory /Users/david/Downloads/ngff-con-testing/working

The resulting zarr is produced as expected, but I don't seem to get any .bfmemo files saved to the specified directory. Instead I get an empty folder generated at /Users/david/Downloads/ngff-con-testing/working/Users/david/Downloads/ngff-con-testing/source and nothing else in the memo directory. There aren't any hidden files present. I get the same result with a few different images.

I'm not sure if I'm misunderstanding what the settings do or if something isn't working correctly.

@melissalinkert
Copy link
Member

This is very likely due to the use of Memoizer.DEFAULT_MINIMUM_ELAPSED in this block:

https://github.com/glencoesoftware/bioformats2raw/blob/master/src/main/java/com/glencoesoftware/bioformats2raw/Converter.java#L1589

That constant's value is 100 (https://github.com/ome/bioformats/blob/develop/components/formats-bsd/src/loci/formats/Memoizer.java#L344) which indicates that if initialization took less than 100ms a memo file will not be generated. The idea is that for very fast initializations, saving/loading a memo file would be slower than just reinitializing the file as normal.

Do you see the expected behavior with a plate or other larger/more complex input dataset?

@DavidStirling
Copy link
Member Author

@melissalinkert You're absolutely correct, turns out that most of my larger files just initialize very quickly.

To prevent future confusion, do you think it might be worth updating this line in the docs:

During conversion, a temporary .*.bfmemo file will be created

to

During conversion, a temporary .*.bfmemo file may be created?

@melissalinkert melissalinkert moved this from Inbox to bioformats2raw 0.9.2 in Converters Jan 22, 2024
melissalinkert added a commit to melissalinkert/bioformats2raw that referenced this issue Jan 22, 2024
@github-project-automation github-project-automation bot moved this from bioformats2raw 0.9.2 to Done in Converters Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants