podlove / podlove-web-player-wp-plugin

WordPress plugin integrating the Podlove Web Player
https://wordpress.org/plugins/podlove-web-player/
6 stars 2 forks source link

performace optimisation / delayed Javascript #88

Open different-thinking opened 3 years ago

different-thinking commented 3 years ago

Hello,

actually I look into performance optimisation of my site. I wonder how I can optimise the Podlove Webplayer.

Deactivating the Podcast Webplayer reduces the "Total Blocking Time" from 1.2 seconds to 470 ms. And the "Time to Interactive" from 3 to 1.4 seconds. That's what I like to get into.

What I see at GTmetrix is the following behaviour: grafik

When I try to delay the loading of the Javascript files the webplayer stops working or it has no effect.

I would be more then happy if you could provider me advise how to speed it up or if you can optimise the loading overall.

Thanks, Robert

alexander-heimbuch commented 3 years ago

Hey, this isn't really a generic issue with the web player it is more related to the Wordpress integration. I tried lazy loading but had issues with all the different themes. So I don't think that this is solvable in a generic way :/

different-thinking commented 3 years ago

I'd like to understand why are these 3 ... 7.js files and why they are loaded so lately.

Overall: As you can see the webplayer causes 30% of the JS traffic on my site and is responsible for a high portion of blocking time and time to interactive. So i would really like to optimize that.

alexander-heimbuch commented 3 years ago

The 3.js to 7.js are lazy loaded components and shouldn't blocking the time to interactive. They are needed to reduce the file bundling. If you want to reduce the overall asset size you need to compile the player yourself with the given template so treeshaking can be done. Thats nothing the plugin is capable of.