<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2012/12/18 Rouslan Placella <span dir="ltr"><<a href="mailto:rouslan@placella.com" target="_blank">rouslan@placella.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi all,<br>
<br>
I've written a patch[0] that will concatenate js files on the server<br>
side before sending them to the client. This will reduce the number of<br>
http requests for js files to one per page. So, effectively, there will<br>
be one request for js files when a user first loads a pma page and<br>
subsequently there will 0 or 1 request (depending if we already have the<br>
needed js file already loaded client side) for any additional page the<br>
user navigates to. The patch would also close feature request[1] #3583340.<br>
<br>
The performance benefits should be pretty obvious. You can see a<br>
screenshot[2] of the firebug network panel that I took before and after<br>
the patch. In the screenshot, I started on the main page and went to 4<br>
different server status pages afterwards. This was on a local<br>
installation, remote installations should benefit even more...<br>
<br>
The reason that I'm bringing this issue up on the mailing list is that<br>
there is also a drawback. Debugging js files will become somewhat more<br>
complex, since we would have to figure out which file a problem might be in.<br>
<br>
So the question is: are we willing to pay the price for this performance<br>
boost?<br>
<br>
Bye,<br>
Rouslan<br>
<br>
[0]: <a href="https://github.com/roccivic/phpmyadmin/tree/js-file-loader" target="_blank">https://github.com/roccivic/phpmyadmin/tree/js-file-loader</a><br>
[1]:<br>
<a href="http://sourceforge.net/tracker/?func=detail&aid=3583340&group_id=23067&atid=377411" target="_blank">http://sourceforge.net/tracker/?func=detail&aid=3583340&group_id=23067&atid=377411</a><br>

[2]: <a href="http://www.placella.com/temp/js-file-loader.png" target="_blank">http://www.placella.com/temp/js-file-loader.png</a><br></blockquote><div><br></div><div>How about making a switch for developers, which would allow for easier debugging in development environment? Could it work like that, or is it too complex to maintain two code paths?<br>
<br>-- <br></div><div>Regards,<br></div><div>Piotr Przybylski<br></div></div></div></div>