podlove / podlove-subscribe-button

Universal button to subscribe to buttons in the desired podcast client or player website
MIT License
62 stars 24 forks source link

Improve performance on subscribe button lists (<100 items) #117

Closed mohrt-dr closed 7 years ago

mohrt-dr commented 8 years ago

We made the experience, that on a list of several subcribe buttons (< 100 items) the performance of building up the page is really slow.

Is there a chance to improve the performance ?

Please keep in mind, that the site www.deutschlandfunk.de uses jquery-pjax and that jquery-pjax will be implemented on www.deutschlandradiokultur.de in future too.

Example URLs: http://www.deutschlandfunk.de/podcasts.2516.de.html?drpp%3Aid=displayAllBroadcasts (75 Podcasts) http://www.deutschlandradiokultur.de/podcasts.2502.de.html?drpp%3Aid=displayAllBroadcasts (43 Podcasts)

benzimmer commented 8 years ago

I think the main problem is that although you are using a custom button to trigger the popup the iframe which is normally used to display the button still gets added to the page.

I'll have a look how much effort it would be to change that behaviour but probably not before next week. If you want to take a look yourself the relevant code is here:

https://github.com/podlove/podlove-subscribe-button/blob/master/src/coffee/app.coffee#L93

If I'm not mistaken it should be possible to just not render the iframe and move lines 119/120 up into the renderButtonIframe function.

mohrt-dr commented 8 years ago

One of our team members found a possible improvement to avoid creating the iframe when it is deactivated with data-hide="true".

podlove-subscribe-button-117.patch.zip

What do you think about this solution ?

matthewkrieger commented 7 years ago

I'm experiencing the same performance issue. Has anything been integrated into the production release since the previous comment which addresses this?

benzimmer commented 7 years ago

With https://github.com/podlove/podlove-subscribe-button/commit/6be9607cf5ce486ff6b28d7df4d6f8a61c14e563 the button iframe is no longer added to the page when a custom button element is used.

Please reopen the issue if this does not solve the problem.