-
Notifications
You must be signed in to change notification settings - Fork 137
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
Remove Reader::scrach_buffer
field + resulting breaking API changes.
#421
base: next
Are you sure you want to change the base?
Conversation
Hmmm... after having already submitted the PR, I now started to wonder:
|
I would like to eventually make this API change, but for now I wonder if it would be simpler to make |
One motivation for the changes in this PR is to improve the performance of It seems that sometimes decoding row-by-row (or at least smaller-than-frame-chunk-by-chunk) may be desirable if pixels needs some kind of post-processing (e.g. applying gamma, alpha premultiplication, etc.) and the user of the |
Is the main concern the desire to avoid breaking changes? One way to address this concern may be to instead add a new API ( OTOH, IMO some breaking API changes may be required for performance one way or another. So maybe another way to proceed is to wait until those other breaking changes have PRs with measurements that show their impact for the |
The goal is to bundle all the breaking changes we'd like to make into a single These changes generally look good to me though, so I'm fine with letting them linger until we're ready to do a breaking release |
Ack. That sounds good and is totally reasonable. Just as an FYI, let me point out that currently I think that I may want to make the following 3 breaking changes:
I think that it's probably desirable to first flush out 3-4 other PRs with non-breaking changes (starting with the |
This commit is desirable, because it avoids copying of image data across intermediate buffers. Avoiding such copying seems important based on the data gathered in image-rs#416 (comment) Removal of `Reader::scrach_buffer` was not included in the initial series of commits used to test the copy avoidance approach on performance, but it should have a similar effect. Fixes image-rs#417
f4c1a10
to
7150f4d
Compare
Status update:
|
PTAL?
This mostly follows what we've discussed in #417.
If we merge this, then some coordination may be required for releasing a new version of the
png
crate and then updating theimage
crate:image
crate after a new version of thepng
crate is released. OTOH, I am not sure how to get notified when this happens?png
crate. It may be worth waiting until some additional changes get merged:Read
=>BufRead
is on the table - I want to try measuring this after flushing out other changes from the "copy avoidance series of commits")