Media weight rework using performance api #13
Open
adamsilverstein wants to merge 18 commits intomainfrom
Open
Conversation
…ring Collect resources after page is fully loaded match by name as well as initiatorType use a more typical screen size Ensure iframe is “displayed” so videos load Ensure lazy loaded elements can load during preview data collection Track preview loading, showing a spinner Scroll page to load any lazy loaded images or videos fall back to large vs full size Improve layout and display of data Remove original calculations section limit to media contained in the class="article-main-section" div Introduce the ability to choose a mobile or desktop weight, defaulting to mobile Improve timing for iframe closure Limit to media contained in page content, excluding avatar images Ensure switching mobile/desktop reloads iframe Remove block based calculation display Improve UI, layout; replace spinner with shimmer load state disable lazy loading in the preview Cleanup: remove unused PHP code for server side calculations Move shimmer style to PHP Cleanup code, remove unused parts, restructure Remove autoplay from video blocks in the media weight preview include videos and images in data filter to unique entries, keeping highest weight Exclude remote resources in case they are included show 4 decimal points for detail section
3f40c09 to
d0bb15b
Compare
adamsilverstein
commented
Dec 19, 2025
| build/ | ||
|
|
||
| # vendor files | ||
| vendor/ No newline at end of file |
Collaborator
Author
There was a problem hiding this comment.
I noticed this was missing, should we ignore vendor?
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.
Description
Updated implementation of media-weight collection, based on the work @roborourke started, using performance.getEntriesByType- part of the Performance API which reports on the weight (size) of assets. Sizes are typically only reported for same domain assets, which meets our requirements neatly.
This PR supersedes #12
Overall approach
performance.getEntriesByTypeand send them out to the iframe parent - the editor.Screencast
screencast.2025-12-19.11-10-29.mp4
Testing instructions