Firefox, large tables and images



  • So, check out this test page: http://tdc.medieval-wars.de/test/test.html

    It's just a 50x50 table with the same image in each cell.



    Using Firefox it needs about 10 seconds to render, IE just displays it immediately.

    If you run it locally(= the .html and the .png are on your hd) Firefox is as fast as IE.

    If you run it "semi-locally"(= the .html is on your hd, and the .png on the web) it's awfully slow again.


    So this only occurs when the image to be displayed a lot of times is being downloaded.

    I just guess it's not downloaded once and then taken from the cache, but downloaded 2500 times.
    Seeing it's filesize (94 Bytes) though, this shouldn't take more than a second for my connection.

    Any ideas?



  • Firefox works fine, and promptly, for me. I'm on 1.5.0.2.



  • Same version here (upgrading to 1.5.0.3 didn't change anything either).
    Hum..



  • This might not work depending on your actual use for this, but:

    <STYLE type="text/css">
    table{
      width: 500px;
      height: 500px;
      background: url('img.png') repeat 0 0;
    }
    td {
      width: 10px;
      height: 10px;
    }
    </STYLE>

    And then just use empty table cells.  You could use a 500x500 div too, which would making loading much, much faster.



  • Firefox fine for me too, v.1.5.0.3.  Maybe your caching is disabled or full, in which case it would request it from the server each time.

    BTW, the requests take time to set up and exit, so time-wise it's not as simple as (time for 94 bytes) * N, there are some overheads.



  • Using Firefox on Windows 2000 (perhaps that's the difference, rather than just the browser), it takes about 15 seconds to load (according to FasterFox). IE loads it practically instantaneously.



  • To clarify, I'm talking about Firefox 1.5.0.3 and Win2K SP4.



  • It wasn't 10 seconds, but maybe a couple of seconds for me. IE did render it noticebly faster, but just by a little.



  • It's probably not the amount of data, but the number of back-and-forth round-trip messages that are occurring (think web-server time-slice/context-switch between each one)



  • I traced it using Ethereal, and it only GETs the image once.  The .html file is only like 90KB, so that shouldn't be much of a problem either, but it seems like most of the traffic is just downloading the page.  Try tracing it and see if you can make more sense of it than I did. 



  • @bullseye said:

    This might not work depending on your actual use for this, but:

    <STYLE type=text/css>
    table{
      width: 500px;
      height: 500px;
      background: url('img.png') repeat 0 0;
    }
    td {
      width: 10px;
      height: 10px;
    }
    </STYLE>

    And then just use empty table cells.  You could use a 500x500 div too, which would making loading much, much faster.

    Yeah, I know the design is pretty stupid, still it doesn't seem quite right, that Firefox needs (at least on my and as I see some other's machines, around 10 seconds to render it.

    @versatilia said:
    Firefox fine for me too, v.1.5.0.3.  Maybe your caching is disabled or full, in which case it would request it from the server each time.

    BTW, the requests take time to set up and exit, so time-wise it's not as simple as (time for 94 bytes) * N, there are some overheads.
    No, caching settings are default. But I guess you're right, if Firefox really loads the same image over and over again (for whatever reason, it certainly DOES cache other images), it might add up to 10 seconds..


  • I used the Live HTTP headers extension to watch the traffic. It seems like the image is only downloaded once:

    http://tdc.medieval-wars.de/test/test.html
    GET /test/test.html HTTP/1.1
    Host: tdc.medieval-wars.de
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,/;q=0.5
    Accept-Language: sv,en-us;q=0.7,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://thedailywtf.com/forums/71175/ShowPost.aspx
    If-Modified-Since: Thu, 04 May 2006 15:56:14 GMT
    If-None-Match: "9c31f-16f15-719ac380"
    Cache-Control: max-age=0
    HTTP/1.x 304 Not Modified
    Date: Thu, 04 May 2006 19:54:43 GMT
    Server: Apache/2.0.55 (Debian) mod_jk/1.2.14 PHP/5.1.2-1+b1
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=100
    Etag: "9c31f-16f15-719ac380"
    ----------------------------------------------------------
    http://tdc.medieval-wars.de/test/img.png
    GET /test/img.png HTTP/1.1
    Host: tdc.medieval-wars.de
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
    Accept: image/png,
    /;q=0.5
    Accept-Language: sv,en-us;q=0.7,en;q=0.3
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,
    ;q=0.7
    Keep-Alive: 300
    Connection: keep-alive
    Referer: http://tdc.medieval-wars.de/test/test.html
    If-Modified-Since: Thu, 04 May 2006 15:56:14 GMT
    If-None-Match: "9c320-5e-719ac380"
    Cache-Control: max-age=0
    HTTP/1.x 304 Not Modified
    Date: Thu, 04 May 2006 19:54:43 GMT
    Server: Apache/2.0.55 (Debian) mod_jk/1.2.14 PHP/5.1.2-1+b1
    Connection: Keep-Alive
    Keep-Alive: timeout=15, max=99
    Etag: "9c320-5e-719ac380"
    Therefore, please report this problem at https://bugzilla.mozilla.org/.



  • FWIW, I get the same results (Win2k SP4, Firefox 1.5.0.3, 2MB ADSL, page takes about 10 seconds to render).  So presumably this is some kind of bug.



  • FWIW, this doesn't take 10 seconds, but it does take a noticeable time to load, on FF 1.5.0.3 on XP SP2.



  • It seems that tables have little or nothing to do with the problem. It takes the roughly the same amount of time to render if the images aren't in a table. It is significantly faster when loaded locally, but still slower than konqueror or opera, both of which render it instantly (actually, konqueror renders it instantly, opera renders it almost instantly) either way. This should be reported as a bug either way, but I would imagine that the problem is in the image (possibly png, a jpeg/gif test case would be useful) rendering code and possibly in the cacheing code.

    FWIW, this is on Firefox 1.5, Opera 9 and Konqeror 3.4.3 on FreeBSD 6-CURRENT.

    If you post this as a bug, please post the bug number here.



  • Just tried it with .jpg - doesn't change anything, and yes, it also happens without the table.

    And seems someone was faster on posting the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=336659



  • Mine's very slow on Firefox 1.5.0.3, Windows XP.



  • Slow on Firefox Mac, too.  Almost instant on Safari.

    Blinding fast with links, though :)

    Simon



  • <FONT face=Arial>Loads perfectly fast for me. </FONT>
    <FONT face=Arial></FONT> 
    <FONT face=Arial>Version 1.5 on XP Pro</FONT>
    <FONT face=Arial>Version 1.0 on Win2000 & XP Pro</FONT>


  • Almost instant:

    1.5, XP Home SP2, Very good cable connection, very fast computer.


    There's so much symptom variation here, I'd attribute this to user system rather than a bug in FFX.



  • Symptom variation? It either loads instantly (= as fast as IE) or it needs a few seconds, which is the case for about 50% of the users who replied here.

    The only thing I can think of was a wide-spread extension that causes this behaviour.

    I didn't test it without extensions, but I guess the guy who filed the bug did.
    (I can only speak for me, but I wouldn't file a bug unless I was kind of sure it really is a bug of the program I'm blaming..)


    I'm still puzzled why this only happens when the image is "on the web", while it is downloaded only once anyway.



  • I tested in Mozilla 1.7.12, Firefox 1.5.0.3, and IE 6.0.2900.[other junk].



    At first, Mozilla and Firefox were both slightly faster in rendering
    than IE.  All three were fairly instantaneous, once the page was
    downloaded.



    However, that's going through Privoxy, which I use to nix
    advertisements.  When I turned off proxy use, Mozilla and Firefox
    took longer to draw the page, and IE seemed to work at the same speed
    as before.



    However, I did not actually time it, and since Privoxy does not change
    the page in any significant way that I can see, my guess is that IE
    only looks faster, because it only renders the page when it's
    complete.  Mozilla/Firefox render it on the fly.  Going
    through the proxy, however, the page is fully downloaded by Privoxy,
    and delivered at LAN speeds to the browser, making on-the-fly look just
    as fast (faster, even).




  • something that might be usefull to add (except that you guy's can't edit your posts), is if you changed your about:config settings according to the widely documented "make firefox faster" tips.



  • My guess is that this is caused by some kind of extension, i.e. AdBlock testing the image url 50*50 times against each regex in the AdBlock file.



  • FF 1.5.0.3/Linux here, running on a crappy old Duron 1100, side opens in about 2 secs. Maybe it depends on the available memory?



  • No, it's not the memory.

    But at least a part of it really boils down to the Adblock-Extension.

    White-listing the test page/deactivating Adblock reduces rendertime to about 4 seconds for me (which is still unnormal high and far away from instantious though)

    Can anyone confirm this or even come to a normal rendertime with deactivated Adblock?

    Is there anyone experiencing this without having Adblock?

    Are all the guys who have instantious rendering running their Firefoxes without Adblock?



  • @TDC said:

    No, it's not the memory.

    But at least a part of it really boils down to the Adblock-Extension.

    White-listing the test page/deactivating Adblock reduces rendertime to about 4 seconds for me (which is still unnormal high and far away from instantious though)

    Can anyone confirm this or even come to a normal rendertime with deactivated Adblock?

    Is there anyone experiencing this without having Adblock?

    Are all the guys who have instantious rendering running their Firefoxes without Adblock?


    It's not enough to deactivate AdBlock in the adblock preferences. You have to actually disable the extension (tools->Extensions). When you merely turn off ad blocking it still parses the page.

    With adblock removed/disabled, the page renders instantaneously on my system.



  • Oh, didn't know that, and you're right, deactivating it like you said solves all problems.

    Posted it on the Adblock Forum: http://aasted.org/adblock/viewtopic.php?p=15335#15335



  • @TDC said:

    Just tried it with .jpg - doesn't change anything, and yes, it also happens without the table.

    And seems someone was faster on posting the bug: https://bugzilla.mozilla.org/show_bug.cgi?id=336659



    That was me. The bug has been opened as bug #336659.



  • Firefox 1.5.0.3 on Windows XP SP2



    Load time ~instantaneous, well under two seconds, probably around 1 second.



    I do not have adblock installed. Fast computer on a fast (LAN - fiber - ISP) internet connection.



    adblock it is?



    P.S.

    Design mode doesn't work for me anymore after I registered.. I just get

     Something didn't quite work out ...
    - Missing Post Body
    


  • @Nand said:

    @TDC said:
    No, it's not the memory.

    But at least a part of it really boils down to the Adblock-Extension.

    White-listing the test page/deactivating Adblock reduces rendertime to about 4 seconds for me (which is still unnormal high and far away from instantious though)

    Can anyone confirm this or even come to a normal rendertime with deactivated Adblock?

    Is there anyone experiencing this without having Adblock?

    Are all the guys who have instantious rendering running their Firefoxes without Adblock?


    It's not enough to deactivate AdBlock in the adblock preferences. You have to actually disable the extension (tools->Extensions). When you merely turn off ad blocking it still parses the page.

    With adblock removed/disabled, the page renders instantaneously on my system.


    I closed the bug as soon as I discovered that it was not a Firefox problem (resolved invalid). Is /^Adblock (Plus)?$/ that common of an extension? Everyone testing it must have had the extension.



  • @Fred Foobar said:

    Is /^Adblock (Plus)?$/ that common of an extension?

    Adblock is the 7th most popular extension on update.mozilla.org and Adblock Plus is not that far behind.

    And the Pierceive Adblock Filter extension is 10th most popular on update.mozilla.org.

    And these don't count direct downloads from the respective websites of the extensions.

    So year, adblock is extremely popular, and I know that it's usually one of the first things I install on a clean Firefox (with Tabmix Plus and a pair of others).



  • @Fred Foobar said:



     /^Adblock (Plus)?$/


    * /^Adblock( Plus)?$/


Log in to reply