]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
log viewer: add heuristic for triggering a new limit load early
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Nov 2021 17:26:22 +0000 (18:26 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Nov 2021 17:26:24 +0000 (18:26 +0100)
Less latency for the user

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/panel/LogView.js

index e52ec1275a42275c385cf53b9115176d3b314624..99c4daaf375c1d33fd5b4eaffa5409612b7a21ab 100644 (file)
@@ -161,7 +161,9 @@ Ext.define('Proxmox.panel.LogView', {
 
            let { start, limit } = viewModel.get('params');
 
-           if (viewStart < start || viewEnd > start + limit) {
+           let margin = start < 20 ? 0 : 20;
+
+           if (viewStart < start + margin || viewEnd > start + limit - margin) {
                me.updateStart(false, line);
            }
        },