Every "load more" is slower than last one

Created on 26 January 2017, over 8 years ago
Updated 23 February 2025, 2 months ago

When clicking "load more", every next time load is longer than the previous one. This is actually borwser processing time, as AJAX response loads in more-less the same time.

Eventually a browser throws an error that script execution time is too long.

This is caused by:

    var $existing_view = this;
    var $existing_content = $existing_view.find('.view-content').children();
    $new_view.find('.view-content').prepend($existing_content);
    $existing_view.replaceWith($new_view);
    $(document).trigger('infiniteScrollComplete', [$new_view, $existing_content]);

That is loading the entire view content into memory and processing this whole heap of data instead of just appending new content to the right container.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇵🇱Poland Graber

Live updates comments and jobs are added and updated live.
  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024