www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Website sometimes running slow

  1. #1
    Join Date
    Oct 2011
    Posts
    11

    Website sometimes running slow

    Hi all,

    I'm struggling with a website that sometimes appears to be very slow.
    This is the website

    Sometimes it takes a lot of time, to load the backgrounds. (okay, the website has to load 7 fullscreen backgrounds, but mostly they loaded in about 5 seconds. But sometimes the website takes 30 seconds or more to load...)

    If you go to "projecten" and select a project, the project images are also loading slow. while those images are about 70kb or less? Sometimes 8 seconds for a 50kb image...?

    I'm loading the images trough ajax with Jquery. Maybe there's a download limit? I can't imagine that?

    Hope somebody can help.

    Regards,

    Roy

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    You have no less than 50 requests (that means 50 different things to be loaded), what else do you expect? And you images are not "70kb or less", you have 3 files about 80KB, 3 files over 150KB, and even 2 files over 200 KB. The total of your loaded files is of 1.4 MB, which is a little bit heavy, don't you think?

    Keep in mind that the files are loaded and displayed in the order of their size (in KB), the heavier the latest, thus a heavy background file will be the last to be loaded. So, it will wait till everything on the document is loaded, to be finally loaded, on its turn.

  3. #3
    Join Date
    Oct 2011
    Posts
    11
    Thank you for the fast reply.

    I know, it's a heavy website, but i'm affraid i can't reduce the number of requests or the total size (Or I have to put all the javascripts in one file. But do you think this will reduce the speed?)

    I think it's strange, that the loadtime is very inconsistent. One time it loads in 5 seconds and the other time in 30 seconds, or more.. (with deleting cash before visiting) What do you think of this?

  4. #4
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Quote Originally Posted by Roywulms View Post
    I think it's strange, that the loadtime is very inconsistent. One time it loads in 5 seconds and the other time in 30 seconds, or more.. (with deleting cash before visiting) What do you think of this?
    The loading time depends on many things: the browser, the CPU's effort, the LAN's speed (which always is variable, depending on how many users access it at the same time), the provider's capacity... And even so, if all the parameters are the same, the speed will always be different, because the data transmission is not linear across the Web.

    All your information is split, at Start, like the wagons of a train. Except that each wagon is sent in a different direction, all over the WW network, following not always the nearer Node, but the most un-ocuppied at that moment.. The wagons are re-assembled only at the Arrival, and they are displayed only when the "team" is complete. That multiple spreading of the information through the web makes the speed to be different each time. If the volume of the information is high, the differences could be considerable.
    Last edited by Kor; 10-05-2011 at 07:55 AM.

  5. #5
    Join Date
    Oct 2011
    Posts
    11
    I tried to reduce the number of request and ended by a total of 40 requests.

    In a previous post of you, you talked about my images that are over the 200kb.
    I know that, but i meant the gallery projectimages, when you select a project. those images are about 70kb or less each. the total gallery "package" per project is around 200kb to load. Those images are loaded trough ajax, so the rest of the page is already loaded. Still, some images are taking a lot of time to load.

  6. #6
    Join Date
    Oct 2011
    Posts
    11
    Edit: The loadingtime of the projectimages are mostly about 2 second. But, sometimes 20 seconds, or more.

    I can't imagine that the speed fluctuation is so high??

  7. #7
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Use Firefox, install the FireBug add-on, and go to the Net tab of the Firebug where you can see all the requests, the length of the loading process and the size of each request.

  8. #8
    Join Date
    Oct 2011
    Posts
    11
    Here are the loading times from Chrome.. It took about 30 seconds to load the page.
    As you can see, it took about 15 seconds, for a 5kb thumb.. and 23 seconds for a 200kb bg image.

    http://roywulmsdesign.nl/clients/wsb/network.jpg

    This is the network overview when you load a project:
    http://roywulmsdesign.nl/clients/wsb/network2.jpg

  9. #9
    Join Date
    Oct 2011
    Posts
    11
    I just tried to load the projectscript that the website normal is loading trough AJAX.
    And this time, it was very slow: 4.2 minutes for in total 190.03KB

    http://roywulmsdesign.nl/clients/wsb/network3.jpg
    You can find the page here


    This is the script:

    PHP Code:
    <?php 
    include ("connect.php");
    $id $_GET['id'];

                    
    $sql3 "SELECT * FROM site_project WHERE project_id = '".$id."'";
                    
    $res3 mysql_query($sql3);
                    while(
    $info3 mysql_fetch_array($res3)){
                        
    $project_name stripslashes($info3["project_name"]);
                        
    $project_ontwerp stripslashes($info3["project_ontwerp"]);    
                        
    $project_opdrachtgever stripslashes($info3["project_opdrachtgever"]);
                        
    $project_samenwerking stripslashes($info3["project_samenwerking"]);    
                        
    $project_content stripslashes($info3["project_content"]);    
                        
    $project_place stripslashes($info3["project_place"]);    
                        
    $project_year stripslashes($info3["project_year"]);    
                    }
                    
                    
    $name str_replace(" ","_",$project_name);
    ?>
            
            <a class="closeproject">SLUIT DIT PROJECT</a>
            <a class="prevbtn"></a>
            <a class="nextbtn"></a>
            <div class="slideshow">
                
                <?php
                $dir 
    '../images/1_projecten_images/'.$name.'/';
                foreach(
    glob($dir.'*.*') as $v)
                {

                    
    $v split('/'$v);
                    
    $file end($v);
                    if(
    $file != "thumb.jpg")
                    {
                        echo 
    '<img src="http://www.domain.nl/images/1_projecten_images/'.$name.'/'.$file.'?'.rand(1,3000).'"  width="530" height="300" alt="omschrijving"/>';
                    }
                }
                
    ?>
        
            
            <!-- slideshow --></div>
            
            <div class="projectgegevens">
            <table>
            <tr><td width="150">project:            </td><td><?= $project_name ?></td></tr>
            <tr><td>ontwerp:                        </td><td><?= $project_ontwerp ?></td></tr>
            <tr><td>opdrachtgever:                    </td><td><?= $project_opdrachtgever ?></td></tr>
            <?php if(!empty($project_samenwerking))
            
            {
                 echo
    '<tr><td>in samenwerking met:</td><td>'.$project_samenwerking.'</td></tr>';
            } 
            
            
    ?>
            </table>
            <a href="includes/getpdf.php?id=<?= $id ?> " target="_blank">Download PDF</a>
            </div>
            
            <div class="projecttekst"><?= $project_content ?></div>

  10. #10
    Join Date
    Oct 2011
    Posts
    11
    I'm sorry, but i bump this thread. I still struggling with the same problem.
    I can't imagine that the speed fluctuation is so high..

  11. #11
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    If your on a "Shared" server, I would complain to your provider because someone else may be causing the server load to slow your site down.

    This is a common problem with shared servers, it may be an indication that the new anti-social neighbor is hogging server services at the cost and expense of everyone else ot a neighbors site got hacked and the new squatter is causing mayhem.

    Whatever the scenario, your paying for web hosting, you are entitled to some service and a quick email to complain about loading times and that the server is sluggish should prompt the company to look at the bandwidth hog. For all you know it may be a hack attempt on that companies server that eating all the bandwidth.

    My server is on a shared server but despite the average load of 1 Meg to 1.5 Meg, load times are not impacted despite the site currently containing nearly 4 Gigbytes of archives, we see no impact on service and our host has not complained about our loading.

    IMHO give your host a prod if your close enough otherwise a well crafted email will get some action. You will likely encounter the "Service Requests" and loggin in to the USER CP and have to go several bouts of emails to get refereed to tier 2 support before your complaint is escalated to tier 3 when you have moaned at someone on the phone from lack of movement on this issue.

    Good Luck

  12. #12
    Join Date
    Oct 2011
    Posts
    11
    Thank you for your reply.

    My hosting says that it has to do with the website. Is that possible? I can't imagine that one time the code is reacting fast and the other time slow..?

  13. #13
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    I suggest that you research your hosting provider by googling them.

    Also... who is your provider?

  14. #14
    I am not expert when in comes to codes but i have to say that the content of the site such as the size videos if there is or picture can affect the loading time of the website. Of course the PC performance and the internet connection too! You can try asking the custom web design firm as well.

  15. #15
    Join Date
    Oct 2011
    Posts
    11
    My hosting provider is not a big one, it's a ICT company that host some website for their clients.

    @pennylane; I know, i've discussed this already in my previous posts. But i think the speed fluctuation is to high to blame the networkspeed.

    So, Anyone thinks it depends on the code? Otherwise i'm going to talk further with the hosting provider.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles