]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Do not send -debug versions of framework files
authorEmmanuel Kasper <e.kasper@proxmox.com>
Mon, 25 Apr 2016 11:42:59 +0000 (13:42 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 3 May 2016 07:24:14 +0000 (09:24 +0200)
From ExtJS4 to 6 the debug files have doubled in size from
4.4MB to 8.8MB
HTTPServer.pm compress these files on the fly before sending them
to the browser (as "Accept-Encoding: gzip"  is the default in
browsers)

On very slow systems (AMD Bobcat for instance, as discussed in
https://forum.proxmox.com/threads/no-webfrontend-showed-in-browser-with-new-gui-pvetest.26951/#post-135699

the compression of this file can take up to 5 seconds, and this will
hit the HTTP Timeout (line 1629) we use for serving static files, provoking the
error:
curl -k --verbose --insecure --header "Accept-Encoding: gzip"  https://slowhost:8006/pve2/ext6/ext-all-debug.js
curl: (18) transfer closed with 1991108 bytes remaining to read

Non-debug files are 4 times smaller, and since everybody will benefit of having
a faster initial load of PVE, there is no reason not to make this default.

PVE/ExtJSIndex.pm

index 257aed88cb15ed1fd45ac9100a1102fb3c88bad0..fae3546c5d8d0db577179a09e492d565e02c478e 100644 (file)
@@ -27,8 +27,8 @@ _EOD
     }
 
     $page .= <<_EOD;
-    <script type="text/javascript" src="/pve2/ext6/ext-all-debug.js"></script>
-    <script type="text/javascript" src="/pve2/ext6/charts-debug.js"></script>
+    <script type="text/javascript" src="/pve2/ext6/ext-all.js"></script>
+    <script type="text/javascript" src="/pve2/ext6/charts.js"></script>
     <script type="text/javascript" src="/pve2/ext6/pvemanagerlib.js"></script>
     <script type="text/javascript" src="/pve2/ext6/locale/locale-${lang}.js"></script>
 _EOD