-
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
Write optimization via caching #33
Conversation
Huh. I guess eager evaluation is a negative here. |
16e3e31
to
13498e9
Compare
Turns out a lot of the slowness was julia's write handler unfolding the reinterpret array type sent to write. This PR now takes a 1000x1000 image save time from 70ms to 2ms (results here) |
@tlnagy Cache now set up, and performs well JuliaIO/FileIO.jl#290 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @IanButterworth, thanks for implementing the cache idea! I think it's unnecessary to build the write-cache on construction of the DenseTaggedImage
type because many TIFFs will only be read and never written. I think it's better to construct this on write.
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
===========================================
- Coverage 87.80% 72.49% -15.31%
===========================================
Files 12 13 +1
Lines 541 658 +117
===========================================
+ Hits 475 477 +2
- Misses 66 181 +115
Continue to review full report at Codecov.
|
Good point! Moved the cache to write time. |
I think this looks good to be merged from my end! I'm not sure if the snooping makes a difference in its current form, but perhaps that's because of latency higher up in the stack. |
Could we move the Snoopcompile stuff into a separate PR and I can go ahead and merge the cache-collect portion of this? |
2005b07
to
3175019
Compare
👍🏻 #35 |
Awesome, thanks for figuring this out! |
Gives a slight increase in write speed. Benchmarks over in JuliaIO/FileIO.jl#290