1. 47
  1.  

  2. 9

    Really cringy writing in this post (emphasis his).

    However, as of Firefox 55 it only takes 15 seconds. For 1691 tabs. Really. I no longer fear restarts. Lately, I just restart Firefox for fun sometimes.

    .

    While consistently using around two gigs of memory, we’ve now reduced to less than half a gig. Yes, this is without actual web pages loaded, but look at this, haters: I’ve now got 1.5 gigs of memory to load web pages into that I didn’t have before.

    .

    The efforts that the Firefox and Gecko and Servo teams are putting into making a SUPERFUCKINGFAST browser are having a real impact

    Parsing 1700 entries from a text file and doing nothing with them takes 0 seconds and uses 0MB of memory. Similarly 1700 favicons stored raw take 0 seconds to decode and use 2MB of memory. If I restart Firefox with 4 tabs it takes 2-3 seconds and uses 300MB, which is 10 seconds and 200MB difference.

    I’m happy that the software I use every day has gone from 6 orders of magnitude too slow to 5 orders of magnitude too slow, but getting a marketing guy to advertise it like “SUPERFUCKINGFAST” and “only takes 15 seconds” is misleading and harmful.

    1. 11

      Parsing 1700 entries from a text file and doing nothing with them takes 0 seconds and uses 0MB of memory.

      If you have a look at the linked bugzilla, it should be pretty apparent that the issue is a bit more complex then that. These tabs need some representation in the system, not only in the GUI, but also for - for example - addons.

      1. 2

        I’m sure I’ve missed some stuff, but it should still really not take multiple seconds. Like adding 1700 entries to the GUI should be very close to instant (certainly less than one frame), and even though addons can do arbitrary amounts of work I expect that most do not.

        @st3fan: any JSON parser will parse 1700 entries in single digit milliseconds, and if you’re storing favicons raw in a single file (which you should if you need to load thousands of them) then it is literally no work, once you’ve read the file you have a directly usable array of icons. More concretely I mean you can do this:

        struct Favicon { RGBA pixels[ 16 * 16 ]; };
        size_t len;
        Favicon * favicons = ( Favicon * ) file_get_contents( "path/to/favicons", &len );
        int num_favicons = len / sizeof( Favicon );
        for( int i = 0; i < num_favicons; i++ ) {
                Favicon * icon = favicons + i;
                // ...
        }
        
        1. 7

          I’m sure I’ve missed some stuff, but it should still really not take multiple seconds. Like adding 1700 entries to the GUI should be very close to instant (certainly less than one frame), and even though addons can do arbitrary amounts of work I expect that most do not.

          You are mostly missing the stuff where Firefox is a codebase from the 90s that originally didn’t even have the concept of tabs. The refactoring to make this work was a multi-year effort.

          It’s very easy to say “I can parse 1700 lines of json in milliseconds”. Yes. Fine. Can you refactor one of the largest OSS codebases in the world to do a thing it wasn’t previously intended to do to doing that, without breaking anything (like addon assumptions)? This is a huge effort.

          1. 4

            But this doesn’t really explain the upward slope in the first half of the graph. It’s not like the amount of 90s code increased between FF 20 and 30 and 40.

            1. 1

              That is not my point. Not caring about the problem is not caring, I agree with that. It’s just also not as simple as the parent poster tries to make it seem.

      2. 3

        Can you write some code, any language, and show that it takes 0 seconds to do those things?

        1. 2

          Pretty by 0 seconds he actually meant <1 seconds or something of that nature.

          And I’m pretty sure reading 1700 lines from a file does take very little time.

          1. 7

            This is like saying “showing a web page is just loading some data from the network and displaying it in a window” - this is not about loading items from a text file, it is in the context of a large application and many more things happen when those urls are loaded. Updating the UI is one of those things.

            It is really easy to not understand the bigger picture, trivialize a problem and then criticize.

            It is much much harder to put in the actual engineering effort to make things better.

            1. 0

              It’s not showing a web page, it’s just displaying 1691 ‘network disconnected’ error messages with URLs at the top.

              1. 7

                There is no “just” in software development. And certainly not in a project as large as Firefox.

                Look at the code, look at the patch. Look at what parts of the larger app this actually touches.

                1. 1

                  This error page seems to be implemented as a web page, loaded from cache, not the network. Rendering engine still has to be initialized and used.

        2. 3

          The scenario in this “benchmark” is so strange that I don’t know what to do with the information.

          A more useful metric is how well it handles a reasonable number of tabs versus competing browsers.

          1. 1

            As the blog post says, users with 100 tabs are not unusual nowadays.

            1. 1

              That’s still a huge gap. The fact that Firefox can struggle to open 1700 tabs is interesting, but doesn’t give any indication of what it’s like for day to day browsing.

              To be fair, I haven’t used Firefox on a regular basis in a long time, so maybe all of its other performance problems have been fixed, and they’re now focusing on extreme outliers.

          2. 2

            Someone wanna run a comparison of ridiculous amounts of tabs on competing browsers?

            Fairly sure it won’t be eg. zero seconds on any of them.

            1. 1

              As another person that uses many tabs (308 tabs across 20 windows at the moment), I am quite happy to see these improvements.

              1. 1

                Does anyone know how to get Firefox to report the number of open tabs?

                  1. 8

                    Thank you. Now, like Inbox Zero, I have another number to feel bad about.

                  2. 1

                    try to close and it will tell you “are you sure you want to close 4000 tabs” or something like that?