-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fixed sequential access #58
base: develop
Are you sure you want to change the base?
Conversation
deluxetom
commented
Jan 13, 2025
- resolves Use sequential mode #56
- Added a check to make sure the image is in memory when needed
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.
Thanks. I still don't understand exactly why Core::ensureInMemory() is only called in four classes. Can you say something more about this and why exactly these classes? My first thought was that they are classes that have nothing to do with resizing but that doesn't seem to be the case.
@olivervogel from what I understand, it depends on the operations that iterate over the image pixels. I updated PlaceMofidier again, it wasn't needed it there after all. |
I think my 2p would be that you shouldn't try to automate I think I would leave the default case as it is (ie. random access, so all operations work), but add some way for users to add a "please open in sequential mode" hint if they know in advance that they will only need to iterate once. How is You could perhaps add some API to let users add |
I'd like to keep the sequential access option as the default if it's the fastest option. So far, it's only automating @olivervogel I think adding a driver option for it could be useful but I'm not sure how to extend the current |
I cannot judge whether it is faster or better to use sequential access. I think if it's not too much of a difference, we should listen to @jcupitt and stick to the default "random access" in both classes and not set automatic calls of The main goal of Intervention Image is to provide an easy-to-use image manipulation layer for various image manipulation extensions in PHP. Since different backends are covered, the current state is that I have not gone into too much detail or configuration of individual drivers. My guideline was to make it as simple as possible for the user of the library and not necessarily cover a full feature set. I think if a more advanced implementation is needed (where it is important to the developer where copyMemory() is placed or if sequential access is needed or not), Intervention Image is not the right library anyway and it is better to use libvips directly. |
@olivervogel that sounds reasonable. One wrinkle here is that A simple workaround would be to add a |