[pve-devel] [PATCH pve-manager] Do not send -debug versions of framework files

Emmanuel Kasper e.kasper at proxmox.com
Mon Apr 25 13:42:59 CEST 2016


>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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/ExtJSIndex.pm b/PVE/ExtJSIndex.pm
index 257aed8..fae3546 100644
--- a/PVE/ExtJSIndex.pm
+++ b/PVE/ExtJSIndex.pm
@@ -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
-- 
2.1.4





More information about the pve-devel mailing list