Berkeley CSUA MOTD:Entry 50275
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2008/6/17-20 [Computer/SW/WWW/Browsers] UID:50275 Activity:kinda low 57%like:50273
6/16    Firefox 3 coming out tomorrow.
        http://news.yahoo.com/s/nf/20080612/bs_nf/60269
        Memory usage - Firefox 3 Beta vs. Firefox 2 vs. IE 7:
        http://blog.pavlov.net/2008/03/11/firefox-3-memory-usage
        \_ There's a rule that says NEVER BE THE FIRST TO TRY IT.
           I'm going to let Firefox3 version 1 hammer out bugs first.
           \_ Um, I've been running the beta and RCs for several weeks now, and
              it's vastly better than v2.
        \_ Why are they reinventing garbage collection?
           \_ Because Firefox is written in a non garbage collected language.
              Because Firefox includes an interpeter for a garbage collected
            language with some complicated object lifespan issues.
            Because there is more to reducing memory footprint than garbage
            collection.
            Because implementing is not the same as reinventing.
            But most importantly:  Because there is much more to reducing
            memory footprint than garbage collection.
              language with some complicated object lifespan issues.  Because
              implementing is not the same as reinventing.  But most
              importantly:  Because there is much more to reducing memory
              footprint than garbage collection.
              \_ Uh yes, but they're worried about cycles?  Who reference
                 counts anymore?
                 \_ The lifespan of a javascript object is a complicated
                    beast.
                 \_ In the past javascript was used sparingly and reference
                    counting was easy and fast.  Yes there were leaks, but
                    once you closed a page the browser could just dump
                    dump everything associated with that page and move on.
                    It worked.  Doing a good mark and sweep gc is hard,
                    especially with how firefox handled javascript execution.
                    Getting that right takes significant programing.
                    (For instance until ie7, ie was even worse about
                    javascript leaks, and they have a much larger team,
                    although at least ie doesn't run javascript
                    in the ui thread, does firefox 3 still do that?)
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2013/8/22-10/28 [Computer/Companies/Yahoo, Industry/SiliconValley] UID:54732 Activity:nil
8/22    http://marketingland.com/yahoo-1-again-not-there-since-early-08-56585
        Y! is back to #1! Marissa, you are SEXY!!!
        \_ how the heck do you only have 225M uniq vis/month when there
           are over 1 billion internet devices out there?
           \_ You think that every single Internet user goes to Y!?
        \_ Tall blonde skinny pasty, not my type at all -former Y!
	...
2013/6/26-8/13 [Computer/Domains, Computer/Networking, Computer/SW/WWW/Browsers] UID:54697 Activity:nil
6/26    This ones for you psb -ausman
        http://25.media.tumblr.com/027fe67c84c2288cc16e9c85db690834/tumblr_mp0ag8DCQI1qzwozco1_1280.jpg
        \- that's pretty good. i wish someone had put the idea to be before i saw
           it on the internet, so see if i'd have put the 9 justices in the same
           boxes. JOHN PAUL STEVENS >> All the sitting justices. --psb
        \- that's pretty good. i wish someone had put the idea to be before i
	...
2012/5/18-7/20 [Computer/SW/WWW/Browsers] UID:54392 Activity:nil
5/18    On my Win7 machine, I've been using a PuTTY ssh session to soda as a
        proxy for my FireFox to bypass my company's OpenDNS when I visit
        http://tv.yahoo.com and so on.  It has been working fine for a long while.
        However, in the past couple weeks or so, my FireFox would either take
        several minutes to load the page, or failes to load it after several
        minutes.  I haven't changed any settings on my Win7 machine.  Rebooting
	...
2012/4/2-6/4 [Computer/SW/Languages/Java, Computer/SW/RevisionControl] UID:54353 Activity:nil
4/02    We use Perforce at work for revision control. It seems to work okay.
        Lately, a lot of the newer developers are saying that Perforce
        sucks and we should switch to Mercurial or Git. I have done some
        searching on the Internet and some others have this opinion. Added
        advantage is that Mercurial and Git are free. However, there would
        be some work to switch for the sysadmins and the developers.
	...
2012/4/26-6/4 [Computer/Networking] UID:54371 Activity:nil
4/26    I see that soda has an ipv6 address but ipv6 traffic from this box
        doesn't actually work (ping6 <DEAD>ipv6.google.com<DEAD>, ping6 http://www.v6.facebook.com
        Is this expected to work?
        \_ Soda doesn't have a real IPv6 address.  The IPv6 addresses you see
           in ifconfig are just link-local addresses; any IPv6-capable machine
           will autogenerate these, whether or not it's connected to an IPv6
	...
2012/4/23-6/1 [Computer/SW/WWW/Browsers] UID:54360 Activity:nil
4/19    My Firefox 3.6.28 pops up a Software Update box that reads "Your
        version of Firefox will soon be vulnerable to online attacks."  Are
        they planning to turn off some security feature in my version of
        Firefox?
        \_ Not as such, no, but they're no longer developing this version,
           so if a 3.6.x-targeted hack shows up, you're not going to get
	...
2012/2/5-3/26 [Computer/SW/WWW/Browsers] UID:54300 Activity:nil
2/5     How is Firefox on version 10, while I still have 3.6 installed.
        I wait for the X.1 versions and they never come out.
        \_ I'm also on 3.6.26.  It claims that versions 4 - 10 are all faster
           than 3.6.x, but do they use more memory?  Thx.
           \_ Newer Firefox versions use less memory too:
              http://www.maximumpc.com/article/news/mozillas_memshrink_program_brings_big_memory_savings_firefox_7
	...
2011/11/8-30 [Computer/SW/Security, Computer/SW/OS/Windows] UID:54218 Activity:nil
11/8    ObM$Sucks
        http://technet.microsoft.com/en-us/security/bulletin/ms11-083
        \_ How is this different from the hundreds of other M$ security
           vulnerabilities that people have been finding?
           \_ "The vulnerability could allow remote code execution if an
               attacker sends a continuous flow of specially crafted UDP
	...
Cache (3417 bytes)
news.yahoo.com/s/nf/20080612/bs_nf/60269
com Thu Jun 12, 4:55 PM ET Just more than 10 years ago, Mozilla threw its open-source code into the public domain. Today, its browser -- Firefox -- is preparing to launch its third major release in hopes of continuing to eat away at Microsoft's Internet Explorer. With the release of Firefox 3, Mozilla could see a boost in downloads and market share. Microsoft's next version of Internet Explorer won't come to market until later this year. On June 17, Mozilla will release Firefox 3 After more than 34 months of active development and the contributions of thousands of people, Firefox 3 will be downloadable free from the Mozilla Web site. Mozilla is promising this is the best browser -- period. "It shows that the browser market is anything but stagnant." A Focus on Security Firefox 3 is based on the Gecko 19 Web rendering platform. Building on the previous release, Gecko 19 has more than 15,000 updates, including some major re-architecting for improved performance, stability, rendering correctness, and code simplification and sustainability. The result, Mozilla said, is a more secure, easier to use, more personal product with a lot more under the hood to offer Web-site and Firefox add-on developers. in the location bar to see who owns the site and to check if the connection is secure. Identity verification is prominently displayed and easier to understand, Mozilla said. When a site uses Extended Validation (EV) SSL certificates, the site's favicon will turn green and show the name of the company. Firefox 3 also has malware protection to warn users when they arrive at sites known to install viruses, spyware, trojans or the like. And a new Web Forgery Protection service blocks the content of pages suspected as Web forgeries. New SSL error pages, Mozilla said, are clearer and stricter, and Firefox automatically disables old and insecure add-on and plug-in versions. Add-ons that provide updates in an insecure manner will also be disabled. Firefox will inform antivirus software when downloading executables and the browser respects the Vista parental control setting for disabling file downloads. Easier, More Personal Mozilla also concentrated on making Firefox easier to use and more personalized. In terms of password management, that means an information bar replaces the old password dialog so users can save passwords after a successful login. The add-on whitelist has been removed, making it possible to install extensions from third-party sites in fewer clicks. And a new download manager aims to makes it much easier to locate downloaded files. Users can also see and search the Web site where a file came from. Firefox 3 allows users to add bookmarks from the location bar with a single click and associate keywords with bookmarks to sort them. Web applications, such as a favorite Webmail provider, can now be used instead of desktop applications to handle Web-site mail links. The Add-ons Manager can be used to download and install a Firefox customization from the thousands of add-ons available from Mozilla's Web site. Gartenberg expects the competition to dominate browsing will continue. Apple is seeding Safari 4 "Clearly, Web browsers are still very important, as important as they were 10 years ago, but just in a different way," he said. "The bottom line is no one is actually paying for a browser any more. It's something you give away in order to make money elsewhere."
Cache (8192 bytes)
blog.pavlov.net/2008/03/11/firefox-3-memory-usage -> blog.pavlov.net/2008/03/11/firefox-3-memory-usage/
Firefox 3 Memory Usage As the web and web browsers have matured, people have started expecting different things out of them. When we first released Firefox, few people were browsing with tabs or add-ons. This can occur as a result of mixing lots of various sized allocations and can leave a lot of small holes in memory that are hard to reuse. One of the things we did to help was to minimize the number of total allocations we did, to avoid unnecessarily churning memory. We've managed to reduce allocations in almost all areas of our code base. The graph below shows the number of allocations we do during startup. The graph below shows we were able to get rid of over 1/3 of them! Jason Evans, to port and tune jemalloc for our platforms. It was a huge effort resulting in Jason doubling the number of lines of code in jemalloc over a 2 month period, but the results paid off. As of beta 4 we now use jemalloc on both Windows and Linux. Our automated tests on Windows Vista showed a 22% drop in memory usage when we turned jemalloc on. Fixed cycles with the Cycle collector Some leaks are harder to fix than others. One of the most difficult ones is where two objects have references to each other, holding each other alive. In previous versions, we've used very complex and annoying code to manually break cycles at the right times, but getting the code right and maintaining it always proved to be difficult. For Gecko 19, we've implemented an automated cycle collector that can recognize cycles in the in-memory object graph and break them automatically. This is great for our code as we can get rid of lots of complexity. It is especially significant for extensions, which can often inadvertently introduce cycles without knowing it because they have access to all of Firefox's internals. It isn't reasonable to expect all those authors to write code to manually break the cycles themselves. Basically, the cycle collector means there are whole classes of leak that we can easily avoid in both our code and in extensions, and that's good for everyone. Tuned our caches Firefox uses various in-memory caches to keep performance up including a memory cache for images, a back/forward cache to speed up back and forward navigation, a font cache to improve text rendering speed, and others. We've taken a look at how much they cache and how long they cache it for. In many cases we've added expiration policies to our caches which give performance benefits in the most important cases, but don't eat up memory forever. We now expire cached documents in the back/forward cache after 30 minutes since you likely won't be going back to them anytime soon. We have timer based font caches as well as caches of computed text metrics that are very short lived. We also throw away our uncompressed image data as I describe below... Adjusted how we store image data Another big change we've made in Firefox 3 is improving how we keep image data around. Images on the web come in a compressed format (GIF, JPEG, PNG, etc). When we load images we uncompress them and keep the full uncompressed image in memory. In Firefox 2 we would keep these around even if the image is just sitting around on a tab that you haven't looked at in hours. Federico Mena-Quintero (of GNOME fame), we now throw away the uncompressed data after it hasn't been used for a short while. Not only does this affect images that are on pages in background tabs but also ones that are in the memory cache that might not be attached to a document. This results in pretty dramatic memory reduction for images that aren't on the page you're actively looking at. If you have a 100KB JPEG image which uncompress to several megabytes, you won't be charged with the uncompressed size when you're not viewing it. Another fantastic change from Alfred Kayser changed the way we store animated GIFs so that they take up a lot less memory. We now store the animated frames as 8bit data along with a palette rather than storing them as 32 bits per pixel. the bug showed us drop from using 368MB down to 108MB -- savings of 260MB! Hunted down leaks Most leaks are a pain in the ass to find and fix in any complex piece of software. If you leak a small piece of text once an hour you probably won't notice. If you leak a large image every time you move the cursor, you've got a big problem. Both are important to fix, because even the little ones add up. Some leaks are only leaks until you leave a page, so they don't show up with conventional leak-finding tools, but they make a difference if you have a page opened all day long like GMail. Leak Hunt Ben Turner has gotten pretty good at Leak Hunt. We've fixed many leaks, ranging from small DOM objects that get leaked on GMail until you leave the site to entire windows that were leaked holding on to everything inside of them when you closed them. Overall, we've been able to close over 400 leak bugs so far, most of which are very uncommon, but can still occur. Carsten Book, in particular, has done an amazing job at finding and reporting leaks. Measuring Memory Use As I've learned the hard way, accurately measuring memory usage is hard. The short summary is Windows Vista (Commit Size) and Linux (RSS) provide pretty accurate memory measurement numbers while Windows XP and MacOS X do not. If you're running Windows Vista and take a look at Commit Size in task manager, you should get some pretty accurate memory numbers. If you're looking at Memory Usage under Windows XP, your numbers aren't going to be so great. changed the meaning of "private bytes" between XP and Vista (for the better). On XP the number is the amount of virtual memory you're application has reserved for use. For performance reasons you often want to reserve more memory than you actually use. The application can tell the operating system that it isn't going to use parts of the reserved space and to not back the virtual space with physical space. On Vista, Private Bytes is the commit size, which only counts the memory the application has actually said it is actively using. Since virtual memory size has to be greater than or equal to your commit size, XP memory numbers will always appear bigger than Vista ones, even though the application is using the same amount of memory. On Mac, If you look at Activity Monitor it will look like we're using more memory than we actually are. Mac OS X has a similar, but different, problem to Windows XP. After extensive testing and confirmation from Apple employees we realized that there was no way for an allocator to give unused pages of memory back while keeping the address range reserved.. It does appear that pages mapped in that haven't been written to won't be accounted for in memory stats, but you've written to them they're going to show as taking up space until you unmap them. Since allocators will reuse space, you generally won't have that many pages mapped in that haven't been written to. Our application can and will reuse the free pages, so you should see Firefox hit a peak number and generally not grow a lot higher than that. Linux seems to do a pretty good job of reporting memory usage. It supports madvise(), allowing us to tell Linux about pages we don't need, and so its resident set size numbers are fairly accurate. Ways to test There are many ways to measure memory usage in a browser. Open up 10 tabs with your favorite websites in them and see how much memory the browser is using. Close all but the last tab and load about:blank or Google. Another simple test is simply loading Zimbra, Google Reader and Zoho each in their own tab and logging in. We've learned that users do so many things with the browser it is nearly impossible to construct a single test to measure memory usage. We wanted more of a stress test -- One that was more reproducible than loading random sites from the web. modified it to cycle pages through a set of windows while opening and closing them to try and approximate people running for a long period of time. Talos makes it pretty straightforward to get this up and running, and is great for measuring things like memory usage and layout speed. This works great for Firefox and allows measuring perf...