-
Notifications
You must be signed in to change notification settings - Fork 10
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
Generating and storing unnecessary data #25
Comments
I personally don't mind the few extra bytes, and WordPress itself is very generous when it comes to storing images. Also you don't have to wait for regeneration of all your images when switching to a different placeholder style. I do understand that there's a lot of data created, especially on image-heavy sites or large blogs, but I have a feeling that there are other areas for optimization, with a larger lever. |
Well, i'm always looking at such things from optimization point of view, keeping in mind that some websites i deal with have thousands of images, iterating through each and instantiating 4 Imagick objects (and operating on them) will definitely take longer than doing same just once if needed, would have to stress-test it though to see if the difference is worth rewriting it. dominant-colors-lazy-loading-wordpress-plugin/admin/class-dominant-colors-lazy-loading-admin.php Line 363 in da7f789
|
I’m also using the plugin on a page with thousands of images. The regeneration was only necessary once at the beginning. When uploading new pictures the dominant color calculation and thumbnail generation isn’t noticeable. If I ever want to switch to a different placeholder style it happens instantaneously. Your suggestion is worth looking into, but I personally don’t have the time for it right now. I'd be happy if you or the community wants to take this on ;) |
Analyzed whole thumbnail generating flow.
I'd suggest, instead of generating 4 thumbnails - generating only one + storing type of it.
If user changes in config thumbnail type - notify that images require regenerating.
It should speed up whole generating process and limit DB usage.
The text was updated successfully, but these errors were encountered: