[6.x] Fix focal point editor performance with large images - #15311
Open
duncanmcclean wants to merge 4 commits into
Open
[6.x] Fix focal point editor performance with large images#15311duncanmcclean wants to merge 4 commits into
duncanmcclean wants to merge 4 commits into
Conversation
…view image improves performance when working with large source images (#15270)
Member
|
I don't know if this actually fixes anything. When I throttle my performance in the devtools, it still feels a bit janky. But now you also lose quality. |
…full preview image" This reverts commit 3af047c. the small listing preset is too low quality for the preview frames, and the main picker image was still decoding the full-size original
…loads a 1600px preset generated through the existing cp thumbnail route, so it works for both public and private containers
both the picker image and the nine preview frames render the same 1600px thumbnail, so the full-size original is never decoded (#15270)
Member
Author
|
Yeah, fair enough. I've added a new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes an issue where the Control Panel's focal point editor becomes slow and janky when working with large source images (multi-MB originals).
This was happening because both the picker image and the nine preview crop frames rendered the full-size original image, forcing the browser to decode and paint the huge image ten times over.
This PR fixes it by adding a
largeControl Panel thumbnail preset (1600px,fit: contain) alongside the existingsmallone inManager::cpManipulationPresets(). It's exposed on CP asset payloads aslarge_thumbnail, and the focal point editor now uses it for both the picker image and the preview frames, so the original image is never decoded at all. 1600px was chosen to keep the previews sharp at the editor's display size, including the zoomed preview frames. The preset is served through the existing CP thumbnail route, so it works the same for both public and private asset containers.Note there's a brief one-time wait the first time the editor opens for a given asset, while the 1600px derivative is generated. After that, it loads instantly.
Fixes #15270