From 0db79529d129dd4fe1e9b7bf823e07510c806bd4 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 21 Jul 2016 19:01:47 +0200 Subject: history: Disable lazy loading for the first 42 thumbnails This speeds up the initial rendering of the page. For a long history (> ~1000 items) the lazyloading JS creates a noticeable delay (>500ms) depending on the cpu power of the machine. Disable lazy loading for the first items so that these are loaded normally by the browser parallel to the scripts execution. Signed-off-by: Florian Pritz --- application/views/file/fragments/thumbnail.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'application') diff --git a/application/views/file/fragments/thumbnail.php b/application/views/file/fragments/thumbnail.php index 8bb7f6aea..82d0743fb 100644 --- a/application/views/file/fragments/thumbnail.php +++ b/application/views/file/fragments/thumbnail.php @@ -5,9 +5,12 @@ $base_url = site_url(); if (substr($base_url, -1) !== "/") { $base_url .= "/"; } +$counter = 0; ?>