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

perf: preload _locales/en/messages.json so we don't have to wait as long for our JS to dynamically load it #26556

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Aug 20, 2024

We always load the English version of messages.json. This PR makes use of link rel=preload so that the browser will get the file ready for use immediately -- well before our JavaScript file that will eventually need it asks for it. This reduces the amount of waiting due to Network Waterfall (even if the network is the local file system).

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

Copy link

sonarcloud bot commented Aug 20, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [369b1f5]
Page Load Metrics (84 ± 15 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint682751154421
domContentLoaded39177813316
load49177843115
domInteractive97827168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.01%. Comparing base (d3541a3) to head (369b1f5).
Report is 25 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26556      +/-   ##
===========================================
+ Coverage    69.96%   70.01%   +0.04%     
===========================================
  Files         1405     1405              
  Lines        48996    49029      +33     
  Branches     13697    13706       +9     
===========================================
+ Hits         34280    34325      +45     
+ Misses       14716    14704      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidmurdoch davidmurdoch marked this pull request as ready for review August 20, 2024 21:15
@davidmurdoch davidmurdoch requested a review from a team as a code owner August 20, 2024 21:15
@HowardBraham HowardBraham added the team-tiger Tiger team (for tech debt reduction + performance improvements) label Aug 21, 2024
@davidmurdoch davidmurdoch added the area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. label Aug 21, 2024
@davidmurdoch davidmurdoch merged commit f06b7a0 into develop Sep 18, 2024
95 checks passed
@davidmurdoch davidmurdoch deleted the preload-messages.json branch September 18, 2024 21:54
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2024
@metamaskbot metamaskbot added the release-12.6.0 Issue or pull request that will be included in release 12.6.0 label Sep 18, 2024
@metamaskbot metamaskbot added release-12.5.0 Issue or pull request that will be included in release 12.5.0 and removed release-12.6.0 Issue or pull request that will be included in release 12.6.0 labels Sep 29, 2024
@metamaskbot
Copy link
Collaborator

Missing release label release-12.5.0 on PR. Adding release label release-12.5.0 on PR and removing other release labels(release-12.6.0), as PR was added to branch 12.5.0 when release was cut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-performance Issues relating to slowness of app, cpu usage, and/or blank screens. release-12.5.0 Issue or pull request that will be included in release 12.5.0 team-extension-platform team-tiger Tiger team (for tech debt reduction + performance improvements)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants