[Phpmyadmin-devel] Query statistics chart slows down page load
tyronx at gmail.com
Thu Aug 4 16:36:26 CEST 2011
On Thu, Aug 4, 2011 at 5:10 PM, Piotr Przybylski <piotr.prz at gmail.com> wrote:
> 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.
The page load event in my case (on a thinkpad x61s - older dual core /
2gb ram, windows xp using chrome as browser, and on localhost) fires
in 6-8 seconds on a full page reload (without frames).
Removing printQueryStatistics() actually throws a js error which
might be the reason why your page loads so much faster. Though for me
it still requires over 5 seconds.
I think the most gain we could get from:
- loading the status variables page on demand. Reason: with js
disabled, a page reload still takes up to 4 seconds (till load event),
and the variables table is ~90% of all the sent content.
reload 2-4 seconds for me. Also merging js files would help - the
> I think this should be fixed, eg. by initializing chart only when user
> actually navigates to it.
Yes I also have my concerns about this. This is why I added css sprites to pma
Loading chart on demand is certainly a good idea.
> Piotr Przybylski
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
More information about the Developers