-
Notifications
You must be signed in to change notification settings - Fork 538
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
Improve performance by not extracting compressed image data if retainImageContent was set to false #590
Conversation
Sorry, i don't have PHPStan installed and set up. How can i interpret its output?
|
PHP-CS-Fixer has complains about the file. Give me a day or two, if you don't want to install PHP-CS-Fixer locally (to fix it). |
Made getHeaderValue private, because it is only used internally. We don't wanna expand our API, if it can be avoided.
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.
Sorry, I didn't had the time to answer properly. Now I have.
First of all, thank you again for your work @se-ti.
I pushed a few changes fixing coding style issues (the ones you mentioned) and made the new method getRawObject
private.
Further remarks in code.
Thanks a lot, @k00ni ! |
Co-authored-by: Konrad Abicht <hi@inspirito.de>
I think, I have added all the requested changes. |
Аny news, @k00ni? |
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.
@se-ti I am very busy currently, but I will try to squeeze in a few minutes here and there. Thank you for bearing with me.
I added a few comments to the code based on your latest feedback. My knowledge in this topic is limited so I will have to trust you on this one. It looks clean and results speak for themselves.
I will leave this open for a few days to give others a chance to object.
Thank You! |
One of previous pull requests allowed not to decompress image data, if the user has set retainImageContent flag to false.
This pull request suggests even not to extract compressed image data, if this flag was set to false.
Minor optimization: extracting stream data tries to use header information about stream's length to speed preg_match up.
This PR improves memory allocation, achieved with pull 582,
from 45M for the first launch, 25M for the best subsequent one
to 43M for the first launch, 18M for the best subsequent.
https://westra.ru/reports/kavkaz/danilina-1el2-arhyz-2021.pdf