<div dir="ltr"><div id="WISESTAMP_SIG_gmail_session" href="http://WISESTAMP_SIG_gmail_session"><div style="font-size:13px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="margin:0px 0px 8px"><p style="margin:0px">
<span style="font-family:arial;font-size:small">On 28 May 2014 19:17, S Moonesamy </span><span dir="ltr" style="font-family:arial;font-size:small"><<a href="mailto:sm+mu@elandsys.com" target="_blank">sm+mu@elandsys.com</a>></span><span style="font-family:arial;font-size:small"> wrote:</span><br>
</p></div></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Ish,<div class=""><br>
At 10:09 27-05-2014, Ish Sookun wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Last note, we could also have a brainstorming session about an Open Source<br>
Policy for Mauritius which hopefully will be a reality. We heard of this in<br>
the beginning of the year & now it seems the project took off. We'll need<br>
input.<br>
</blockquote>
<br>
</div><a href="http://www.defimedia.info" target="_blank">www.defimedia.info</a> is based on Open Source software.  <a href="http://www.defimedia.info" target="_blank">www.defimedia.info</a> once had a problem; its web site was too slow.  The person responsible for <a href="http://www.defimedia.info" target="_blank">www.defimedia.info</a> did not ask for help on this list.  I tested the time it takes to load <a href="http://www.defimedia.info" target="_blank">www.defimedia.info</a> in a web browser.  It took 22.5 seconds.  I don't know what industry practices is followed in Mauritius.  According to international industry practices the load time would be considered as inacceptable as it is too slow.<br>

<br>
The load time for <a href="http://www.gov.mu" target="_blank">www.gov.mu</a> is 3.38 seconds.  The web site is not based on Open Source software.  Is the <a href="http://www.defimedia.info" target="_blank">www.defimedia.info</a> web site slow because it uses Open Source software or is it because there isn't the necessary support for Open Source software?<br>

<br>
Does anyone on this mailing list find it inacceptable that one of the top web sites in Mauritius is so slow?  Are there any local companies with the knowledge to fix the problem?<br>
<br>
Regards,<br>
S. Moonesamy<br></blockquote><div><br><br>Hello,<br><br>A website, whether based on opensource software or otherwise, depends on many factors to get a good performance, mainly front-end coding, back-end coding, and server configuration.<br>
<br>There are many things to write; I don't know where to start :-( Sorry for not doing the analysis in a structured and consistent way...<br><br><b>Font-end coding</b> (presentation layer): HTML, CSS, JavaScript</div>
<div><br></div><div>A simple inspection of the source of the homepage shows the following:</div><div>- use of different javascript framework (Mootools & jQuery) - why not use 1 ? Using 2 because some JS plugin requires a particular JS framework ?</div>
<div>- use of too many JS plugins/libraries to do simple stuff (they could have coded few JS lines instead of using plugins / libraries)</div><div>- (JS) use of eval() - eval'd code executes more slowly</div><div>- use of separate icons (image files) instead of sprites. Other images need compression (using JPEGmini ?)</div>
<div>- including social media & ads network - facebook, google+, disqus, googleads (hence loading their JS libraries) causes slow load times<br><br>Defimedia.info is hosted on a server in Dallas. I've done some performance tests using a server in Kansas City ! Results, not good at all (what about Mauritius ?) :<br>
<br><table id="tableResults" class="" align="center" border="1" cellpadding="10" cellspacing="0" style="margin-left:auto;margin-right:auto;border-collapse:collapse;border:0px solid white;font-family:Arial,Helvetica,sans-serif;font-size:12px;line-height:16.799999237060547px;text-align:center">
<tbody><tr><th align="center" class="" valign="middle" style="border:1px solid white;padding:0.4em;background-image:initial;background-repeat:initial"></th><th align="center" class="" valign="middle" colspan="5" style="border-width:1px;border-color:white silver silver white;border-style:solid;padding:0.4em;background-image:initial;background-repeat:initial">
</th><th align="center" class="" valign="middle" colspan="3" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(220,220,220)">Document Complete</th>
<th align="center" class="" valign="middle" colspan="3" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(220,220,220)">Fully Loaded</th></tr><tr><th align="center" class="" valign="middle" style="border-width:1px;border-color:white silver silver white;border-style:solid;padding:0.4em;background-image:initial;background-repeat:initial">
</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">Load Time</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">
First Byte</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">Start Render</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">
<a href="https://sites.google.com/a/webpagetest.org/docs/using-webpagetest/metrics/speed-index" target="_blank" style="color:rgb(0,0,0)">Speed Index</a></th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">
DOM Elements</th><th align="center" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(220,220,220)">Time</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">
Requests</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">Bytes In</th><th align="center" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(220,220,220)">
Time</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">Requests</th><th align="center" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(220,220,220)">
Bytes In</th></tr><tr><td align="left" valign="middle" style="border:1px solid silver;padding:0.4em">First View</td><td id="fvLoadTime" valign="middle" style="border:1px solid silver;padding:0.4em">17.298s</td><td id="fvTTFB" valign="middle" style="border:1px solid silver;padding:0.4em">
3.416s</td><td id="fvStartRender" valign="middle" style="border:1px solid silver;padding:0.4em">6.698s</td><td id="fvVisual" valign="middle" style="border:1px solid silver;padding:0.4em">6865</td><td id="fvDomElements" valign="middle" style="border:1px solid silver;padding:0.4em">
3227</td><td id="fvDocComplete" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em">17.298s</td><td id="fvRequestsDoc" valign="middle" style="border:1px solid silver;padding:0.4em">
250</td><td id="fvBytesDoc" valign="middle" style="border:1px solid silver;padding:0.4em">3,053 KB</td><td id="fvFullyLoaded" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em">
17.298s</td><td id="fvRequests" valign="middle" style="border:1px solid silver;padding:0.4em">250</td><td id="fvBytes" valign="middle" style="border:1px solid silver;padding:0.4em">3,053 KB</td></tr><tr><td align="left" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">
Repeat View</td><td id="rvLoadTime" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">8.170s</td><td id="rvTTFB" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">
0.065s</td><td id="rvStartRender" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">5.855s</td><td id="rvVisual" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">
6416</td><td id="rvDomElements" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">3227</td><td id="rvDocComplete" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(245,245,245)">
8.170s</td><td id="rvRequestsDoc" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">115</td><td id="rvBytesDoc" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">
740 KB</td><td id="rvFullyLoaded" class="" valign="middle" style="border-width:1px 1px 1px 2px;border-color:silver silver silver black;border-style:solid;padding:0.4em;background:rgb(245,245,245)">9.292s</td><td id="rvRequests" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">
118</td><td id="rvBytes" class="" valign="middle" style="border:1px solid silver;padding:0.4em;background:rgb(245,245,245)">790 KB<br><br></td></tr></tbody></table><br>The first bytes start to arrive at around 3.4s (what the server was doing ? PHP ? SQL ?) and rendering starts at around 6.7s - this means that DOM is ready after around 3s (good developers know that a webpage must render quickly; hence server must send contents quickly + DOM must be made ready quickly for browser to start rendering - include JS in the <HEAD> may slow down the rendering process; JS is put at the end of the document with the exception of Modernizr, if used. CSS must be in the <HEAD>, then contents (<BODY>), then before closing the <BODY>, you include JS. The browser should first render the page using DOM contents and CSS, while JS should be made to execute last.</div>
<div><br><b>Back-end coding</b> (application & database layer): Server-side programming language (e.g. PHP), SQL statements<br>- PHP coding ?<br>- Database ?<br>> SQL queries ?</div><div>> Use of indexes in DB tables to speed up SQL execution. Not using indexes will increase execution time on server</div>
<div>> Query caching ?</div><div><br><br></div><div><b>Server configuration</b>: VPS ? Dedicated ? Shared ?<br>- Load balancing, contents on CDN, accelerators (e.g. Varnish), etc. @Ish / @Ronny may shed more lights here<br>
<br>Regards,</div><div><br><div id="WISESTAMP_SIG_gmail_session" href="http://WISESTAMP_SIG_gmail_session"><div style="font-size:13px;font-family:Verdana,Arial,Helvetica,sans-serif"><div style="margin:0px 0px 8px"><p style="margin:0px">
<span style="font-family:'courier new',courier;font-size:small;color:rgb(0,128,0)"><strong>Mohammad Nadim Attari</strong></span></p><div><span style="font-family:'courier new',courier;font-size:small;color:rgb(51,51,51)">Bon Air Branch Road<br>
</span></div><div><span style="font-family:'courier new',courier;font-size:small;color:rgb(51,51,51)">8th Mile, Triolet</span></div><div><span style="font-family:'courier new',courier;font-size:small;color:rgb(51,51,51)">Republic of Mauritius<br>
</span></div><div><span style="font-family:'courier new',courier;font-size:small;color:rgb(51,51,51)"><strong>Tel</strong>: <a href="http://s.wisestamp.com/links?url=tel%3A%252B230%25205-786-3665&sn=" target="_blank"><span style="color:rgb(51,51,51)">+230 5-786-3665</span></a><br>
</span></div><div style="clear:both"></div></div><a href="http://s.wisestamp.com/links?url=http%3A%2F%2Ftwitter.com%2Fnadimattari&sn="><img width="16" height="16" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/twitter.png" style="padding: 0px 0px 5px; vertical-align: middle;"></a> <a href="http://s.wisestamp.com/links?url=http%3A%2F%2Ftwitter.com%2Fnadimattari&sn=" style="color:black">Twitter</a> <a href="http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fnadimattari&sn="><img width="16" height="16" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/linkedin.png" style="padding: 0px 0px 5px; vertical-align: middle;"></a> <a href="http://s.wisestamp.com/links?url=http%3A%2F%2Fwww.linkedin.com%2Fin%2Fnadimattari&sn=" style="color:black">LinkedIn</a> <a href="http://s.wisestamp.com/links?url=https%3A%2F%2Fplus.google.com%2F103715017381118793614&sn="><img width="16" height="16" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/googleplus.png" style="padding: 0px 0px 5px; vertical-align: middle;"></a> <a href="http://s.wisestamp.com/links?url=https%3A%2F%2Fplus.google.com%2F103715017381118793614&sn=" style="color:black">Google Plus</a> <a href="http://s.wisestamp.com/links?url=https%3A%2F%2Fwww.facebook.com%2Filearn.mu&sn="><img width="16" height="16" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/facebook.png" style="padding: 0px 0px 5px; vertical-align: middle;"></a> <a href="http://s.wisestamp.com/links?url=https%3A%2F%2Fwww.facebook.com%2Filearn.mu&sn=" style="color:black">Facebook</a><br>
<span style="color:gray">Contact me: </span><img width="16" height="16" alt="Skype" border="0" src="https://s3.amazonaws.com/images.wisestamp.com/skype.png" style="padding: 0px 0px 5px; vertical-align: middle;"> nadimattari<br>
<div style="max-width:469px;padding:0.5em 0px"><table width="100%" style="color:green;font-family:inherit;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit;margin-top:1em"><tbody><tr valign="top">
<td width="1%" style="font-family:inherit;padding:2px 6px 1px 3px;border-right-width:1px;border-right-style:solid;border-right-color:rgb(229,229,229);font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit">
<img src="https://s3.amazonaws.com/images.wisestamp.com/widgets/green_32.png"></td><td style="font-family:inherit;padding:1px 8px 4px;font-size:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;line-height:inherit">
Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.</td></tr></tbody></table></div><div style="width:auto;padding-top:2px;font-size:10px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);margin-top:10px">
<span style="font-family:arial;font-size:small"> </span></div></div></div></div></div><br></div></div>