Deferred loading or lazy load of the commenting system for wpdiscuz  

  RSS

SirLouen
(@sirlouen)
New Member
Joined: 5 months ago
Posts: 4
17/06/2019 6:24 pm  

I've been testing wpdiscuz lately and I've found that it introduce a huge amount of resources that severely damage the load speed of the site

Is there any way to defer the loading of Wpdiscuz? 

(The youtube links are the only one not related to WpDiscuz)

 

This topic was modified 2 months ago by Tom

Quote
SirLouen
(@sirlouen)
New Member
Joined: 5 months ago
Posts: 4
17/06/2019 6:36 pm  

More info:

With WPDiscuz activated + 1 comment:

Without WpDiscuz:

+1 second faster loading, nearly half the total page size, half the requests.

The page is a 3000 word article with some images and some youtube videos.

What I would like is simply defer the load of WpDiscuz after the page has loaded, for example, with an AJAX script that starts loading WPDiscuz when the user starts scrolling.


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3454
21/06/2019 5:17 pm  

Hi @sirlouen,

We've discussed with our team and decided to add such functionality in near future releases. 


ReplyQuote
peacherd
(@peacherd)
Active Member
Joined: 5 months ago
Posts: 9
24/08/2019 12:42 pm  

Hello there, 

Any news about this? Really waiting on some lazy load function to be able to use WPDiscuz and all your addons on my website.

Thanks


ReplyQuote
omriamos
(@omriamos)
Active Member
Joined: 3 years ago
Posts: 5
25/08/2019 12:31 am  

Hi,

Any updates about this?

I have stopped using wpDiscuz because this feature was missing, and I'm currently using "Lazy Load for Comments" which is great - but only using the default WP comments system.

Please include lazy loading in wpDiscuz, and please also make sure that it will lazy load the entire module, meaning that it will also load the add-comment form (with the user's ID etc.) via ajax - this feature is critical for html-caching of the posts.


peacherd liked
ReplyQuote
peacherd
(@peacherd)
Active Member
Joined: 5 months ago
Posts: 9
27/08/2019 8:14 pm  
Posted by: @astghik

Hi @sirlouen,

We've discussed with our team and decided to add such functionality in near future releases. 

Any idea if this is going forward? Thanks!


ReplyQuote
peacherd
(@peacherd)
Active Member
Joined: 5 months ago
Posts: 9
13/09/2019 4:45 pm  

Bump!


ReplyQuote
Astghik
(@astghik)
Support Team Admin
Joined: 2 years ago
Posts: 3454
14/09/2019 5:24 pm  

@peacherd

I'm really sorry, but I cannot provide any ETA yet. I'll update this support topic once I get some news for you. 


ReplyQuote
peacherd
(@peacherd)
Active Member
Joined: 5 months ago
Posts: 9
14/09/2019 5:31 pm  

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible. 

Again, thanks for a great plugin that isn't surpassed by any! Time to get some additionnal plugins 😉


Astghik liked
ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 2958
15/09/2019 3:44 pm  
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.


ReplyQuote
SirLouen
(@sirlouen)
New Member
Joined: 5 months ago
Posts: 4
15/09/2019 4:03 pm  
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

I'm on Wp-Rocket, and have not found a solution in that sense. According to WP Rocket good practices is the way you load the JS, which makes difficult for them to defer it. 

Not sure, but maybe Lity library is the issue by not using referring libraries

https://github.com/madrobby/zepto/blob/master/src/deferred.js

Scripts should be always loaded with the WordPress script loading functions, otherwise they will never be intercepted by most Cache plugins.


ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 2958
15/09/2019 4:13 pm  
Posted by: @sirlouen
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

I'm on Wp-Rocket, and have not found a solution in that sense. According to WP Rocket good practices is the way you load the JS, which makes difficult for them to defer it. 

Not sure, but maybe Lity library is the issue by not using referring libraries

https://github.com/madrobby/zepto/blob/master/src/deferred.js

Scripts should be always loaded with the WordPress script loading functions, otherwise they will never be intercepted by most Cache plugins.

Sure, all wpDiscuz scripts are loaded via WordPress functions with 100% WP standards. The issue mentioned in this topic is not script loading problem.


ReplyQuote
peacherd
(@peacherd)
Active Member
Joined: 5 months ago
Posts: 9
15/09/2019 5:03 pm  
Posted by: @tomson
Posted by: @peacherd

@astghik

Sorry for being pushy on this subject! I finally found a way to make WPDiscuz dynamic with W3 Total Cache activated so all is good, but I wouldn't mind this feature being developped when possible.

Thank you for letting us know. It would be great to know what exactly you did to solve this conflict.

Sure! I basically used Page Caching Fragment feature from W3 Total Cache (mfunc) and englobed the WPDiscuz shortcode inside wpquery within the mfunc tags inside my single template.

This way, even though mfunc can't tell what post the user is looking at, which made comments_template() impossible to use, one makes the loop inside mfunc thanks to the wpquery. Thus, all the page is cached but the comment template is dynamically loaded every time.


ReplyQuote
Tom
 Tom
(@tomson)
Support Team Admin
Joined: 5 years ago
Posts: 2958
15/09/2019 5:19 pm  
Posted by: @peacherd

Sure! I basically used Page Caching Fragment feature from W3 Total Cache (mfunc) and englobed the WPDiscuz shortcode inside wpquery within the mfunc tags inside my single template.

This way, even though mfunc can't tell what post the user is looking at, which made comments_template() impossible to use, one makes the loop inside mfunc thanks to the wpquery. Thus, all the page is cached but the comment template is dynamically loaded every time.

Nice! Thank you for sharing this information.


ReplyQuote
SirLouen
(@sirlouen)
New Member
Joined: 5 months ago
Posts: 4
15/09/2019 5:20 pm  
Posted by: @tomson

The issue mentioned in this topic is not script loading problem.

True, I've checked again and now I see that the only things not deferred are the recaptcha and the Facebook connect code, which has some inline JS.


ReplyQuote
omriamos
(@omriamos)
Active Member
Joined: 3 years ago
Posts: 5
15/09/2019 5:22 pm  

This method is specific to W3 Total Cache, please don't cancel this feature request as it is essential for CDN HTML-caching of the posts pages.


peacherd liked
ReplyQuote
Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: