Skip to content
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 of placeholder and add ghs performance test #17725

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Jan 8, 2025

Suggested merge commit message (convention)

Other (engine): Improve performance of the placeholders.

Other (image): Attribute loading="lazy" will be automatically added in editing view to images with height and width attributes set to improve loading performance.

Tests: Added new ghs manual performance test.

MINOR BREAKING CHANGE (image): Starting from this release, images that have height and width attributes set will automatically receive loading="lazy" attribute in the editing area. This happens only for the content loaded into the editor, the data output produced by the editor remains the same. The reason for this change is to improve user experience in documents that may contain hundreds of images.


This is a continuation of #17589.

When looking at the numbers reported by the performance tests, we can see that these changes have reduced the load time of the ghs test by around 23% (from 9400ms to 7300ms).

However, when images were present in the document, a lot of code was run after they were loaded, so the browser window was still frozen for a few seconds after the editor was rendered. When this is considered, the performance is now 2 times better (loading, scripting, rendering, and painting took 17800ms before, but only 8900 ms after, including devtools overhead).

@filipsobol filipsobol force-pushed the improve-performance-in-placeholder-2 branch from f355e08 to a63ce4d Compare January 8, 2025 16:14
@filipsobol filipsobol merged commit b5f5341 into master Jan 9, 2025
10 checks passed
@filipsobol filipsobol deleted the improve-performance-in-placeholder-2 branch January 9, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants