On Thu, Aug 4, 2011 at 11:12 PM, Piotr Przybylski piotr.prz@gmail.com wrote:
2011/8/4 Tyron Madlener tyronx@gmail.com:
On Thu, Aug 4, 2011 at 5:10 PM, Piotr Przybylski piotr.prz@gmail.com wrote:
Hi,
Query statistics tab greatly increases page load time in my browser - I get about 5s delay before tabs are created which is IMO too slow. Removing "<?php printQueryStatistics(); ?>" from the code decreases it to less than a second and causes page load event to be fired about 10 seconds earlier (at 2nd second instead of 12th).
printQueryStatistics() itself only displays a rather small table and a bit of json code. That itself should actually hardly make a difference. To test the page load time without the chart you'd need to remove the PMA_createChart()-call inside initTab() in server_status.js. In my tests it only loaded 200-300ms faster though.
In my test it loaded 8s faster (time betreen DOMContentLoaded and load events) after adding "break;" in initTab() for 'statustabs_queries'. Firebug profiler shows that PMA_createChart executes in 500 ms, but it also causes 8s of delay. I guess it is caused by page reflows during chart drawing. It definitely shouldn't happen during page load, even 500ms is a lot.
localhost, Intel i5 M540 (2,53 GHz), Windows 7 and Firefox 5.
Also when adding a break; there and using FF5 I cannot reproduce this huge speedup as you have. For me it only loads about a second longer.
If you say it might be caused by page reflows - what if you add the following to theme_right.css.php?
div#statustabs_queries .highcharts-container { width:530px; height: 350px; }
Does that help with anything? As for me, I see no clear speed improvements in ff or chrome
-- Piotr Przybylski