Skip to content

Fix performance: unused and blocking resources#2840

Merged
adamwoodnz merged 4 commits intotrunkfrom
fix/2679-performance-unused-resources
Aug 27, 2024
Merged

Fix performance: unused and blocking resources#2840
adamwoodnz merged 4 commits intotrunkfrom
fix/2679-performance-unused-resources

Conversation

@adamwoodnz
Copy link
Copy Markdown
Contributor

@adamwoodnz adamwoodnz commented Aug 13, 2024

Fixes #2679

There are some unused resources loaded by plugins which impact FCP and LCP:

Note that dashicons CSS also affects load performance, but can't be removed while the admin bar is always shown for login/registration.

This PR improves loading performance by:

  • Only loading necessary Jetpack CSS
  • Removing Vimeo player JS on lesson archive
  • Removing YouTube player JS on lesson archive
  • Deferring frontend scripts where possible (locale notice and dependencies, course outline)

There is still a large performance hit from loading the WordPress components package for the locale switcher but this will be addressed separately. If TranslatePress is adopted the locale switcher may not be necessary at all, or otherwise we might want to rewrite it using native web UI components.

@adamwoodnz adamwoodnz self-assigned this Aug 13, 2024
@adamwoodnz adamwoodnz added the [Component] Learn Theme Website development issues related to the Learn theme. label Aug 13, 2024
@adamwoodnz adamwoodnz marked this pull request as ready for review August 14, 2024 04:41
@adamwoodnz adamwoodnz force-pushed the fix/2679-performance-unused-resources branch from a115002 to 11d1a0c Compare August 14, 2024 04:43
@adamwoodnz adamwoodnz changed the title Fix performance: unused resources Fix performance: unused and blocking resources Aug 19, 2024
@adamwoodnz adamwoodnz force-pushed the fix/2679-performance-unused-resources branch from 11d1a0c to 3a1781b Compare August 19, 2024 22:49
@adamwoodnz adamwoodnz force-pushed the fix/2679-performance-unused-resources branch from 3a1781b to 707fa3a Compare August 26, 2024 04:34
@adamwoodnz adamwoodnz force-pushed the fix/2679-performance-unused-resources branch from 9284749 to a6fbf7c Compare August 27, 2024 21:43
@adamwoodnz adamwoodnz merged commit f526184 into trunk Aug 27, 2024
@adamwoodnz adamwoodnz deleted the fix/2679-performance-unused-resources branch August 27, 2024 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Component] Learn Theme Website development issues related to the Learn theme.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Performance optimization

1 participant