Skip to content

Lazy Loading comments

Chris Hampton requested to merge hampton1122/commento-lazy-load:master into master

As I was running a load test with Jmeter in an effort to test how the commento API would do under a heavy load of comments, I discovered the API was very responsive and worked well under load. The caveat is that when you go to the page where the comments are related to, the page would start to drag with more then 300 comments. In fact, my load test had over 2,000 comments and would eventually invoke the web page to be unresponsive. What this merge request does is create an array of array of comments split into chunks of 100 comments. I added a scroll event listener to look for a specific div on the page and then add the next slice of the array until we have shown all the comments.

Edited by Chris Hampton

Merge request reports