First Look At Firefox 3.0 Beta 2 531
DaMan writes "ZDNet takes Firefox 3.0 beta 2 for a spin and draws some conclusions that should be sweet music to Mozilla's ears.
"Beta 2 feels snappier and far more responsive than beta 1 (or Firefox 2.0 for that matter) and I can feel the difference on all the systems that I've tried it on — from a lowly Sempron system to my quad-core monsters. No matter what you want doing — opening a new tab, moving tabs, opening up Find, zooming in and out of the page, bookmarking — it all happens swiftly and smoothly. What surprises me about the Firefox 3.0 beta is how many memory leaks that Mozilla have fixed. Complaints of memory leaks with Firefox 2.0 were met with an attitude of "Leaks? What leaks?" Considering that there have been more than 300 leaks plugged, it's obvious that past versions leaked like sieves.""
Re:Hmmm... (Score:5, Informative)
Overall, feels good and polished (Score:5, Informative)
It's interesting to see the new animated-ish tab movement on the tab bar (when you scroll the mousewheel over it) and the animation when things like 'Remember this password?' appear. They look pretty, but are slow on some crappy video cards -- would anyone know how these 'animation' effects can be disabled?
And, kudos to the Firefox team -- I've been using v3 Beta1 for some time, and the browser does feel snappier. Of course, I haven't loaded up my 4-5 'must-have' extensions (Adblock, TabMixPlus, SwitchProxy, DownloadThemAll mainly, sometimes YSlow) so it'll be interesting to see how v3 does in "real"-use scenarios.
Re:Hmmm... (Score:3, Informative)
And before anyone jumps on this and points out that it used to, it has apparently regressed and no longer does, according to the last comments on the bug.
Not to mention that, even if it does (finally) pass Acid 2, there are still a ton of CSS3 features that Firefox fails to implement.
Re:Memory Leaks? (Score:2, Informative)
There may be some teensy weensy little miniscule memory leaks that could be plugged up here and there, but the reason people think there is some big memory handling problem is because of how we cache things for quick use of the 'back' button. Your browser isn't taking up hundred of megabytes of memory because of a leak, but because it makes the back button super duper fast! And since memory is so cheap these days and everyone has a ton of it, what's the big deal about half a gig dedicated to the browser anyway?
The old cross-platform coding guidelines (Score:3, Informative)
While that doesn't rule out Resource Allocation Is Initialization (RAII) - a standard C++ memory management tool - it does make it a lot more labor intensive, by requiring special code to be written for each type of object that's managed.
With templates being allowed, one can use the standard library auto_ptr, as well as reference counted smart pointer templates.
Re:Memory Leaks? (Score:2, Informative)
Actual memory addresses aren't. If you allocate 1,000 pages, free a few in the middle, and try to allocate another thousand contiguous pages, you won't get them a few from here and a few from there.
I'm sure it's possible to stitch together a byte here, a byte there, and so on in your VMM, but that would be a lot of overhead and you'd need to be pretty good at packing algorithms to make that work. I'm also not sure that malloc() has to return contiguous memory.
Re:Memory Leaks? (Score:5, Informative)
The problem with memory fragmentation is that as firefox gets used it allocates memory for buffers then stops using some of that memory. The memory unused is too small to return to the OS and if a large amount of memory is needed then more is allocated sice none of the spaces are large enough to hold whatever object that needs the memory.
It's entirely possible that firefox would have 1/3 to 1/2 of it's memory unused at any given time.
Knowing that's the problem and fixing a problem as complicated as that are two different things unfortunatly
Re:Memory Leaks? (Score:1, Informative)
You can reduce fragmentation somewhat without compaction by using a pooled allocator, and by careful ordering of allocations, but they're stopgaps. Really, firefox needs a compacting GC, yesterday (C++ is a terrible, terrible language for doing anything in).
Over time, firefox, particularly on windows (linux has a somewhat better allocator at the system level AFAIK), ends up with a really, really fragmented memory space.
Re:Memory Leaks? (Score:3, Informative)
But I'm a Debian user, you insensitive clod! (Score:4, Informative)
Re:But I'm a Debian user, you insensitive clod! (Score:3, Informative)
The only complaints I've seen about Iceweasel vs. Firefox (see, for example, posts in the "Software" section of the sidux.com forum) is that the Debian maintainer may not be doing a very decent job of bug-checking before uploading releases to the repositories. Other than that, everything (every extension, theme, bookmark, password, etc.) that has worked for me in Firefox also works on my Debian machines. It looks and acts exactly the same, including plugins.
Re:I like firefox... (Score:5, Informative)
Have you tried Opera? It's really quite good. I use it on my older Linux laptop (128MB ram) because it's the only modern browser that can show pages without thrashing the drive. I also use Opera on powerful machines - I think it's the best browser out there in terms of both the feature set and the quality of workmanship.
Re:Hmmm... (Score:5, Informative)
Hmm... The test breaks and IE is suddenly compliant while previously compliant browsers are not *dons his tin foil hat*
Re:Hmmm... (Score:5, Informative)
Re:Hmmm... (Score:3, Informative)
Re:Why so many leaks? (Score:5, Informative)
To the best of my knowledge, Firefox typically does not leak memory, at least in the conventional sense that references to memory are erroneously discarded and unused allocated memory cannot be freed. Instead, the actual heart of the issue is supposedly memory fragmentation:
http://blog.pavlov.net/2007/11/10/memory-fragmentation/ [pavlov.net]
As the linked article suggests, memory fragmentation can be reduced by replacing heap allocations with stack variables, where possible, in hotspots such as the JavaScript engine. As for the heap allocations that cannot be dealt away with in this manner, effort can be made to group them together such that they are less likely to cause fragmentation.
Re:Hmmm... (Score:4, Informative)
Re:Hmmm... (Score:5, Informative)
The version of Acid 2 on the author's website [hixie.ch] works fine.
Re:Hmmm... (Score:2, Informative)
Re:Memory Leaks? (Score:5, Informative)
The claim I _have_ seen made is that leak bugs would be easier to fix if people actually provided some idea of how to reproduce the leak (e.g. which sites they visited in the process of leaking). At some point David Baron wrote an extension that allowed collecting such data automatically, and the results from this led directly to a number of leaks being fixed in Gecko 1.9.
The other issue Gecko 1.8 had is that it had several leak scenarios that particularly hit AJAXy apps. With the growth in the number of such apps, the leaks became more serious. Gecko 1.9 fixes those issues.
Try the beta. You might like it.
Re:The old cross-platform coding guidelines (Score:4, Informative)
I'm not sure why it's "heinous" advice to say "avoid writing code that won't compile and will have to be backed out"...
Re:Memory Leaks? (Score:3, Informative)
Most web pages seem to have images, which all together add up to more than 100k. Then there's the DOM tree, the Javascript libraries, all the script state with variables, objects, etc. There's IFRAMEs and OBJECTs.
Lots more than just the surface.
Re:Firefox Seems To Losing Its Luster (Score:1, Informative)
Re:Memory Leaks? (Score:3, Informative)
Not only that, but there are two sizes to deal with for images: compressed and uncompressed. A 100x100 pixel JPEG might take up 7K of file space, but that's 100*100*24 bits = 30K. I seem to recall reading that one of the changes they made to save memory in Firefox 3 was to drop the uncompressed copy of the image after a certain amount of time, since you can always re-extract it.
Re:I like firefox... (Score:2, Informative)
Re:Firefox Seems To Losing Its Luster (Score:3, Informative)
Now YOU are misrepresenting who end-users are. My wife, who is definitively not a geek by any standard and could hardly be described as a "power user", regularly uses the windows Task Manager to clean up / kill processes whenever her machine slows down, and I've observed a lot of other casual Windows users do the same thing. Just because you don't think end-users rely on these tools doesn't make it so.
Re:Is the 'downloader' still a piece of shit? (Score:2, Informative)
(AKA I agree, and here's how I get around it)
Re:looking forward to going back to firefox (Score:2, Informative)
You might wan to try the Tab Mix Plus session saver, instead (you can find it at addons.mozilla.org).
Hope that helps.
Re:Modern attitude to bugs (Score:5, Informative)
Obviously, you aren't a developer. If you were, you'd know what they are dealing with.
You write some software, test it, and release it. You sink your heart and soul into it, you design it meticulously, and you are careful to leave the end-user in a position of strength - they can do whatever they want. You explain how to use it to the rest of your staff. They start training end users. Shortly, the calls start to flood back. How does NNN work? Why does "XXX" do that when you click on the button? And so on.
At first, you're all too happy to explain how NN feature works. But after a few years, while you're still explaining how feature NN works, you realize that you have documentation, notes on the website, an embedded help system, a features list, and a nice website that all explain the issue at hand.
You are willing to accomodate the fact that end users are not programmers. You ask for language, improvements, etc. that make it easier to understand what's going on.
But despite documentation and careful training, most calls I get are NOT bugs or problems, they are examples of the software doing exactly what it was supposed to do. I remember one support call I got that sounded like very serious data loss. The end-user denied seeing any error messages or anything by the program that would indicate any data loss. This end user went through several support staff before finally coming to me, the "chief tech weenie".
To avoid any ambiguity, I ran a Remote Desktop tool (VNC inside an NSIS installer) so that I could see what the end user was actually seeing. And right in the middle of the conversation, our software kicked up an error with a message that started with "PAY ATTENTION - YOU MIGHT LOSE DATA", which then explained the whole situation in pretty plain English. The end user was mid-sentence with me when this error popped up, and without skipping a beat, she clicked on the "ok" button. There was no pitch change, no pause, nothing in her voice. When I asked about the error message, she replied with "Oh, I see that all the time, and I just click OK".
So I had the fun of explaining to her that the message she hadn't bothered to read explained why she was losing data, and that the program had been laying out, to her, exactly what she needed to do so that everything worked as expected, and that she had been busy ignoring this safeguard, and that our product didn't kick up messages for the fun of it, etc...
I've even had the fun of having a user complain that they "aren't getting the latest features" of our product, only to find that when the update prompt came up, they were clicking "Cancel" without even reading the popup message.
I'm not saying that there aren't bugs that I find that are perfectly legit - but it's frustrating how many people assume that software will be sentient somehow and solve their problems for them, to the extent that they don't feel any need to pay attention to what's on the screen. They click OK, Cancel, red "X", or whatever to get the "annoying screen" out of their way so they can "get something done".
I've taken to kicking up windows that can't be dismissed unless they type some code, like: "I don't mind losing data" or "yes I want to delete this forever", or "I am liable for the information I'm about to lose". No, not that long, but you get the idea. If the end user can't dismiss the window without reading the message on it, maybe they'll read it.
Vista users are the worst - their O/S kicks up so many worthless messages they are truly desensitized to them.
Nowadays, I answer the phone politely but tersely, and I don't really bother to hide the fact that I have better things to do with my time. I go so far as to make sure that they have the right answer, then bail as quickly as I can without being openly rude.
Re:Memory Leaks? (Score:3, Informative)
With memory its the opposite. Blocks are ALWAYS allocated in complete chunks. So the smallest holes never get filled. -Free Memory- gets fragmented instead of data, and because small bits of memory are useless the end result being that more and more space is used.
Re:Hmmm... (Score:4, Informative)
Re:Why the hell (Score:2, Informative)
Middle click anywhere else -> Open/search whatever you have in your clipboard(use that a lot)
Re:Hmmm... (Score:2, Informative)
Re:Memory Leaks? (Score:3, Informative)
C++ has everything to do with it. Since C++ allows programmers to use actual pointers, it cannot run an automatic garbage collector and memory compactor in the background. This is because it would have to update pointers referring to data areas moved during compaction to reflect the new location, but it wouldn't know what memory elements are actually pointers, which makes this impossible.
This is why Java-style (C#-style, Python-style, whatever) references are good. They don't point to any real memory, but rather into a list of objects, where the real pointers are located. When compacting memory, only this list would have to be updated, as no data contains real pointers that would have to be updated and all pointers are available in this list.
Re:Hmmm... (Score:3, Informative)
Re:Firefox Seems To Losing Its Luster (Score:2, Informative)
Perhaps the parent wants different tabs to be loaded via parallel threads... I am a heavy user of extensions and frequently visit some heavy sites on slow connections... A lot of times firefox just locks up while loading a particular tab (like slashdot or gmail). It would be great if I could use another tab while firefox does it's thing on the busy tab.
Re:Firefox Seems To Losing Its Luster (Score:1, Informative)
Presumably (is it really not obvious to you?) the user is asking for more responsive and independent behavior both across and within tabs. Seems an entirely reasonable (and quite clear) request to me.
As for what operations to perform in separate threads, isn't that rather obvious?!! For a responsive user interface any operations that may independently hang or take time to complete should be relegated to seperate threads.
Re:Memory Leaks? (Score:4, Informative)
Firefox isn't just remembering some HTML code and images, that's what the cache is for, it's remembering the STATE of the web page. When you hit the back button, it (usually) remembers what you've entered in the form, where you were scrolled to on the page, etc. It remembers the page as it was when you left it so it doesn't need to render it all over again. This includes rendered CSS, Javascript states, uncompressed images, the DOM tree (as the GP mentioned). They wouldn't be able to call it "Instant Back" if it had to render the page again, because that wouldn't be very instant.
Re:Hmmm... (Score:5, Informative)
No, it really did. That's your first clue that it isn't done yet. :)
Firefox is developing more quickly because it doesn't have all of the baggage. It has its hurdles to overcome like and project, but they don't have to worry about making their browser render any page written in Netscape Composer properly. IE still has to make all those FrontPage sites look like the code wasn't shat out of some third graders science project on the effects of mold on diodes.
With good developers, lots of money, and as much savvy as anyone, Microsoft has the ability to produce all kinds of amazing software. Once they've made some great software (like a browser that renders Acid 2 properly), that's when they start adding in all of the backwards compatibility that effectively crushes the product.
I believe that Windows could be every bit as polished as OS X, as lean as Linux, and as secure as BSD if they didn't bend over backwards to maintain compatibility with every in-house-developed Visual Basic app that accesses odbc.ini, has hard coded requirements to be at the root of C:, and writes user preferences to HKLM.
Mirosoft needs to learn that sometimes things shouldn't work with their new OS. That isn't to say that Apple doesn't do this to the other extreme, breaking things with every point release and forcing developers to come out with updates to all of their software every year or two just so that it won't run in some degraded mode, but there's a happy medium in there where you do a lifecycle on the components of your OS. If they could ease people along, explain the benefits of the new way of doing something, and make a clean break instead of using hacked together tangled bundles of cruft, we'd all be in a better place.
Ok, so I strayed off topic. Anyway, I use Opera. : )
Re:Firefox Seems To Losing Its Luster (Score:3, Informative)
I don't know if this could be fixed without a rewrite but this shows really that FF needs more threading, and I think that it should provide better isolation using several process so when an extension crash the whole browser doesn't crash..
Re:Firefox Seems To Losing Its Luster (Score:3, Informative)
"Threading between tab sessions" should be obvious - you use one thread for the abominably slow rendering job (yes, I browse Digg and Salon, why do you ask?) in one tab so that it doesn't prevent the user from interacting with the already rendered pages in other tabs. It seems like Firefox is at least trying to do some cooperative multitasking here, but that never worked very well in Windows 3.1 and it hasn't gotten any better since.
I don't know what the original poster meant by "Threading within tab sessions" (using multiple cores for rendering?), but I'd at least like to see a separate process (not just thread, but process, communicating over sanity-checked IPC) used for every plugin. You never know when Adobe's going to screw up Flash again, for instance, and it's just unnecessary for Firefox to be so closely tied internally to its plugins that a crash in one of the latter can bring down the whole web browser.
Unfortunately, making a serial code multithreaded is not just a matter of forking off a new thread or two. Separate plugin processes can probably be handled with "shim" code, but handling concurrent memory access within the browser core would at least require a total code review, albeit not a total rewrite.
Re:Memory Leaks? (Score:3, Informative)
I tried it with your terms, and didn't get similiar results at all.
http://www.google.com/search?q=web+page [google.com]
1) 230KB: http://en.wikipedia.org/wiki/Web_page [wikipedia.org]
2) 173KB: http://en.wikipedia.org/wiki/Website [wikipedia.org]
3) 38KB: http://geocities.yahoo.com/ [yahoo.com]
4) 317KB: http://www.steves-templates.com/ [steves-templates.com]
5) 189KB: http://www.howstuffworks.com/web-page.htm [howstuffworks.com]
6) 263KB: http://www.wpdfd.com/ [wpdfd.com]
7) 199KB: http://office.microsoft.com/en-us/frontpage/default.aspx [microsoft.com]
8) 112KB: http://www.webpagesthatsuck.com/ [webpagesthatsuck.com]
9) 267KB: http://www.benedict.com/ [benedict.com]
Measurements taken on "Net" tab of Firebug, which lists all HTTP requests for the page and the Content-Length.
This situation is exacerbated, even, by the fact that many responses are gzipped, and the Content-Length in this case represents the compressed length, rather than the space taken by the response in cache (which I assume is uncompressed, but I could be wrong here).