Plugging Internet Explorer's Leaks 480
jgwebber writes "If you're developing DHTML web apps, you probably already know first-hand that Internet Explorer has horrendous memory leak issues. You can't not run on IE, so you've got to find a way to plug those leaks. So I've created a tool to help you find them. So until Microsoft decides to fix its browser architecture (ha!), at least we can keep it from blowing huge amounts of memory."
How about firefox? (Score:5, Interesting)
Re:How about firefox? (Score:4, Interesting)
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:3, Interesting)
Re:How about firefox? (Score:4, Insightful)
Re:How about firefox? (Score:2)
It is like... saying that C programs are broken because they make core dumps...
Re:How about firefox? (Score:2)
void main(void)
{
int *test;
test = malloc(10);
free(test);
free(test);
}
Now, exactly how is it the COMPILER'S fault that the above program is going to dump core? I've rarely seen a core dump occur for any reason OTHER than because a C program is broken. It's very rarely a compiler issue.
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:3, Informative)
Bubble bustin' time! Garbage collection doesn't always live up to its reputation. I have seen Java apps leak memory like a sieve. This one project I was working at would start up a production (!) EJB container in the morning, and by 13:00, it would have run out of memory and crashed. I told them to fix their leaks. When they got over
Re:How about firefox? (Score:2, Informative)
Is such an approach also useable for finding firefox leaks?
Doubtful. This is targeted at a very specific memory leak that Internet Explorer is known to have.
As a user (not developer, alas) I'm noticing that it invariably gets sluggish after some period of time, even with few pages open.
Apparently Firefox 1.1 will fix a lot of these memory leaks. You can try out "Deer Park" if you want a preview of Firefox 1.1.
Re:How about firefox? (Score:2)
Just yesterday I left my notebook turned on with firefox opened.
After I returned 8 hours later I didnt payed attention and entered to some page with a flash game. Then I noticed my computer was very very slow, I pressed the ctrl-shft-esc to show the sysinternals proc. explorer and firefox was eating 99% of my CPU time and like 216 MB of memory (private bytes, the Virutal size was like in 300+MB).
So if that happens when Fx is
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
Just because a problem has been found does not mean it has been fixed in 1.0* . If you look at the bug reports there are many bugs that have been in every version of 1.0*, are known (and seem easily fixable) but were not fixed yet. Supposedly this and others are fixed in 1.1 and beyond though.
Re:How about firefox? (Score:2)
Prove it.
Re:How about firefox? (Score:5, Interesting)
Memory fragmentation is a big issue for modern desktop systems as the heap used by programs written in C/C++ can't be compacted, and most memory allocation systems weren't necessarily designed to support programs that would be continually allocating and deallocating memory for days on end. Robert Love gave a (fairly detailed and technical) talk on it at while back, with some suggestions for combating it on the Linux desktop, which I recommend to anyone who is interested. It's about 126MB, Ogg format.
http://stream.fluendo.com/archive/6uadec/Robert_Lo ve_-_Optimizing_GNOME.ogg [fluendo.com]
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:3, Insightful)
Re:How about firefox? (Score:2, Informative)
Re:NOOB... (Score:3, Funny)
Re:NOOB... (Score:2)
Re:NOOB... (Score:2)
Re:NOOB... (Score:2, Interesting)
Re:NOOB... (Score:3, Funny)
Re:How about firefox? (Score:2)
"How can we get information on optimization to everyone on the internet? "
"Lets all fly to Germany and then stream videos of ourselves! "
Your dichotomy is idiotic.
I expect he'll stick the slides up soon anyway.
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
So
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
-Jesse
Re:How about firefox? (Score:2)
I upgraded to tiger 10.4 and firefox 1.03 and 1.04 both need restarts every other day. The system slows way down, with a spinning beach ball, but I can force quit it and restart in seconds to clean up the mess.
I have been using safari but don't like how it deals with bookmarks.
Re:How about firefox? (Score:2)
But Gecko does use something similar internally to IE called XPCOM. It's possible that some of the similar techniques that could track down memory issues in IE be adapted to work in Gecko. For example you can c
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
Re:How about firefox? (Score:2)
Memory lost to a memory leak is, by definition, not part of the resident set
for the process and as such, is the most likely candidate to be
swapped out to disk. Therefore, as long as you have swap space left on disk,
other apps should not be noticeably effected.
Quick and dirty fix (Score:3, Informative)
2. Right-click anywhere, select New, then Integer. In the dialog prompt that appears, type:
browser.cache.memory.capacity
3. Click OK. Another dialog prompt will appear. This is where you decide how much memory to allocate to Firefox. This depends on how much RAM your computer has, but generally you don't want to allocate too little (under 8MB), but if you allocate too much, you might as well not do this. A go
Re:Quick and dirty fix (Score:5, Funny)
Please, tell us more about the fascinating workings of computers you seem to know so much about.
Here's how. (Score:2)
Man, this Google Calculator thing comes in handy.
--grendel drago
Re:Quick and dirty fix (Score:2, Funny)
I think you made a simple typo in this sentence. It should read Thus 16 megabytes = 1283918464548864 bytes.
Re:Quick and dirty fix (Score:2)
Re:Quick and dirty fix (Score:2)
Uh...base 12? No. The answer you are looking for is that 16k kilobytes (16 megabytes) is what you want to enter, not 16 thousand kilobytes.
A kilobyte is 2^10 (1024) bytes.
A megabyte is 2^20 bytes, OR 2^10 kilobytes.
So if you want 16 megabytes expressed in kilobytes (as this firefox setting wants), you take 16*2^20 megabytes
Not Microsoft's Fault (Score:4, Funny)
Korean outsourcing
Pesty Internet Explorer Memory leak ... (Score:2, Informative)
Has anyone used firefox? (Score:5, Insightful)
Frankly, I think you can find problems and features you hate in most programs of a certain size, what matters is that you find the tool for the job that you consider the best match for your needs.
First, is it a problem? (Score:3, Informative)
If you do have accompanying slowdowns, then you have a specific, rare problem. See the other replies you've gotten so far for suggestions.
Re:First, is it a problem? (Score:2)
I have never encountered this problem with Firefox and I have occasions where I have several (10 to 20) concurrent downloads runn
Re:First, is it a problem? (Score:2)
I've never had lockups/slowdowns on actual downloads, but then I'm
Re:First, is it a problem? (Score:2)
Re:Has anyone used firefox? (Score:3, Interesting)
Re:Has anyone used firefox? (Score:3, Informative)
Also, it's not on one machi
Re:Has anyone used firefox? (Score:2)
I don't run it on Linux enough to
Re:Has anyone used firefox? (Score:2)
Everytime I try to download ten things firefox goes up to 300 megs of memory usage and 99% cpu usage.
I'm always fascinated when people get upset that a particular application uses a large amount of memory or CPU cycles. It really doesn't do you any good when your computer is in an idle state -- you're eating energy and doing nothing. If I was never supposed to use 300M of RAM, then why did I buy a 512M stick? What good is my fancy whizz-bang processor if it's looping through no-ops 99% of the time?
O
best plug for it (Score:2, Informative)
vulnerabilities, bad experiences, and poignant advice, people still continue to use it.
The alternatives aint perfect but they are a hell of a lot better.
"Microsoft Internet Explorer 6.x with all vendor patches installed and all vendor workarounds applied, is currently affected by one or more Secunia advisories rated Highly critical"
"Currently, 20 out of 81 Secunia advisories, is marked as "Unpatched" in
Making sites not run on IE (Score:2, Funny)
<?
if (preg_match("/MSIE/i", $_SERVER["HTTP_USER_AGENT"])) {
header("Location: http://www.mozilla.org/products/firefox/");
exit();
};
?>
<html>
<head>
<title>This site will not display in Internet Explorer</title>
.
.
.
</head>
<body>
.
.
</body>
</html>
Re:Making sites not run on IE (Score:3, Insightful)
Re:Making sites not run on IE (Score:2, Insightful)
Re:Making sites not run on IE (Score:2)
Re:Making sites not run on IE (Score:2)
The niches I can name outright include:
Re:Making sites not run on IE (Score:2)
Re:Making sites not run on IE (Score:2, Insightful)
even better (Score:2)
Szo
Don't Bother (Score:4, Insightful)
Anyway, if you write things specifically for IE -- then you've already got a more serious problem that you have to address first. There's no excuse for what you already know to be dismal practice.
Re:Don't Bother (Score:2)
Re:Don't Bother (Score:2)
" If you work around a problem, it hides from the user that the problem exists."
This is VERY true.
Which is why on my site [bowlie.com] I purposefully avoid giving a hoot that IE can't display PNG's properly.
When I tell people to use Firefox, it's an added sense of wonder when they do and see that suddenly the images don't have grey backgrounds after all. It also helps hammer home just how cruddy the software (IE + Windows... it is an integral part of the OS afterall) that they were using actually is.
It's the s
You're so right! (Score:2)
Will Internet Explorer 7 fix the existing leaks? (Score:2)
Re:Not on the to-do list (Score:3, Insightful)
Come on. That's a cheap shot. There is no indication that Microsoft stole any code whatsoever for IE7.
Ever wonder why Slashdot gets the reputation of being a bunch of crazy coots? Yep, it's people like you lobbing unfounded allegations against Microsoft.
There are plenty of valid reasons to attack Microsoft. You don't need to m
Well keep up the good work (Score:2)
ECELLENT Work (Score:2)
I will be using this on a regular basis. COOL Stuff at first glance, very cool....
RTFA (Score:2, Informative)
Re:RTFA (Score:3, Informative)
Not exactly.
It detects memory leaks that are due to the two separate garbage collection routines that IE employs for DOM objects on the one hand, and JavaScript objects on the other. The leaks occur when a developer creates a circular reference between a JavaScript object and a DOM object, which is a very easy and natural thing to do.
For example, this creates a memory leak in IE:
someNode.onmouseover = function() { this.style.color = "#f00" };
That is "poor" code only in the sense that it trips over
Re:RTFA (Score:4, Insightful)
What I badly, badly want... (Score:2)
Reasoning: I find that most of the apps I've been working on can benefit greatly from being done mostly in
Re:What I badly, badly want... (Score:2)
But I'll never use it. AX opens all kinds of possibilities you don't want, like spyware and backdoors.
Re:What I badly, badly want... (Score:2)
Worst IE hammering and flamebait article ever (Score:4, Insightful)
IMHO, It's laughable to mock IE for memory leaks when Firefox is X (where X > 1) times worse at sucking up and retaining memory.
People have relentlessly said the reason IE is faster to load than IE on Win32 is because it is "embedded into the OS" and somehow brushed off this advantage in favour of it's debateable disadvantage in terms of security. What's next? Will slashdotters crying out something along the lines of "WOW! IE, an embedded part of the Windows, has memory leaks! What does that say for the Operating System? You better use Linux!"?
IE may be guilty of having a buggy implementation of web standards such as CSS2.1 but during the browser wars wasn't it IE producing functionality that hadn't even been drafted by the W3C yet?
Isn't that "Internet Explorer's architecture made this app fairly easy to build." as testament to the browser?
This tool is interesing and useful for developers and I thank jgwebber for writing it as I'm sure it'll be useful even to lowly personal developers like me.
On the other hand i'm a bit baffled as to why this article wasn't simply written as "Hey IE has memory leaks, checkout this new tool [blogspot.com] by jgwebber and see for youself. Let's discuss how sucky Internet Explorer is and cover up all the flaws in competitor browsers".
It would have had the same effect as CowboyNeal's unnecessary "(ha!)"'s and claims of IE's "horrendous memory leak issues" without a link giving some evidence for these claims for those of us without first-hand DHTML development experience.
I truly wasn't aware of any serious IE memory leaks..i'm going to, go off and Google for information now using the cumbersome Firefox. Any links would be much appreciated since CowboyNeal didn't bother.
Firefox Sucks (Memory) (Score:4, Informative)
Thanks, I'm glad someone pointed this out. My system has been up for many days now and IE and Firefox are both consuming about the same amount (90-something MB).
Re:Worst IE hammering and flamebait article ever (Score:2)
In conclusion, IE has memory leaks. Nya nya.
Re:Worst IE hammering and flamebait article ever (Score:2, Interesting)
You soon will... Even if jgwebber had the best of intentions when he wrote the tools (help Web developers write their javascript in such a way as too be easy on IE's leaky memory manager), I'm quite sure that is not what it will be used for in most cases. Quite the contrary! How long until we'll see a new flurry of "worst viewed with Internet Exploder" sites that throw your PC into a swap orgy seconds after they opened up and showed you their obgoats?
Keep on hammering, nobody's listening (Score:4, Insightful)
You say that like it's a good thing(!)
"Internet Explorer's architecture made this app fairly easy to build." as testament to the browser?
No; for some pretty obvious reasons: one obvious one being, you exclude anyone not using that particular browser. I thought everyone realised that was a Bad Thing - or maybe you haven't been one of those people who can't use their online bank because the bank decided to arbitrarily depend on IE. One can only hope that accessibility laws will put an end to such stupidities.
It's not surprising that both browser products have memory leaks. However one could reflect deeply on the differences in responsibility and approaches to remediation. In Firefox's case - being open source - you have complete transparency; you can file a bug on it, check the bug db, or even fix it yourself (don't laugh). In M$'s case, all you can do is kiss your money goodbye and hope they fix it "one day".
The same goes for all the rest of their system, too. It is not always obvious what a disturbing abdication of rights using a closed system is. A friend recently told me of a Visual $tudio crash triggered by a few \b backspace characters in a print statement. Not such a big deal, I thought at the time; but I found myself reflecting on his story later. Eventually the true horror of the situation sank in, which is that we have to completely trust the ability and goodwill of the vendor to deal with any and all issues in their O/S. That is no small responsibility and there is not much evidence that M$ is capable of fulfilling their end of the bargain. I would postulate, after RMS of course, that no closed and proprietary system on the scale of M$ products can be adequately maintained by one vendor. And of course maintenance becomes irrelevant when major "rewrites" are involved, such as have been prescribed by Longhr0n to fix W1ndows' fundamental ills (ref Spolsky on rewrites, Things You Should Never Do [joelonsoftware.com]).
The thought that one has no recourse and indeed not even any way to inspect the system one uses (livelihood, etc), is deeply, deeply disturbing, and I again have to thank RMS for pointing out long ago [gnu.org] what a dead-end that is, and for putting in place viable alternatives.
Re:Worst IE hammering and flamebait article ever (Score:3, Interesting)
I remember one time writing a page which by accident, hit a memory leak in Mozilla (before there was a FireFox) which consumed about 1mb of ram a second. All the page did was draw a bouncing line, by creating a div for every line pixel of every frame and disp
Re:Worst IE hammering and flamebait article ever (Score:4, Insightful)
Yes, and that was the whole damn problem.
The point of HTML was universal interoperability (so Tim Berners-Lee's collegues could all read each other's stuff no matter what computer setup they had). But Microsoft sacrificed this in order to obtain control and market share. They encouraged web developers to use their proprietary markup, which forced people into using their browser if they wanted to access this content.
This was not a benevolent gesture from Microsoft- it was nothing but a power-grab. Open, agreed-upon standards are the foundation of interoperability, and Microsoft always stands against this when it thinks it can monopolize a technology.
Not sure but.. (Score:2)
Exactly my point. (Score:2)
Now that we understand each other, may I check your code for you?
What if this was Firefox (Score:2)
The post would be more like.
"Firefox has some basic issue releasing memory in certain scenarios involving DHTML. Recently a tool has been released to help alleviate the problem until the problems are fixed."
Do we have to act like children around here. It is a software program, not a brutal dictator.
The problem with IE is.... (Score:2)
...that once Microsoft decided that it had the browser game all wrapped up it Disbanded the Internet Explorer team. This meant that a lot of long standing bugs are still present in the product, but hey, that really doesn't matter since 99% of people will still use it for years to come.
Now that Microsoft has seen that Firefox could take their proprietary lock-in away they are starting development again.
The thing is, Firefox does have memory leaks, but they are actively fixing them...can the same be said
Re:The problem with IE is.... (Score:2)
I don't know. Norway's most popular online newspaper (vg.no) today released fresh log analyses showing that only 86% of their visitors are IE users (compared to 95% one year ago). 8% use Firefox, and 5% use Opera. That may just be crazy Norwegians, though. I'd sure like to see what the numbers are for Slashdot.
great idea (Score:4, Informative)
Why not leave IE to Microsoft; put your effort toward something you can actually fix rather than being an ankle-biting ass.
Um..I'll have a shot (Score:3, Interesting)
I don't know why you geeks have such a downer on Microsoft for writing buggy software. If it didn't, do you have any idea about how many of you would be out of a job? The capitalisation that flows from Microsofts inability to write good operating systems is immeasurable. If it worked first time - would there be any engineers?
It's sort of analogous to cruise liners. Used to be, because ships weren't terribly well made, a clipper had a huge crew of dirty, scurvey suffering swabbers.
Re:Um..I'll have a shot (Score:2)
Ships != platforms (Score:2)
Bug-free operating systems and browsers, however, make it much easier and enjoyable to build fantastic castles in the air^Winternet. That's the part of the web designer's job that is actually enjoyable.
We'll always need more software. Having a stable platform just means the work gets interesting and innovative faster.
Re:Um..I'll have a shot (Score:2)
wealth creates free time.
wealth creates fun.
Re:Um..I'll have a shot (Score:2)
As I've migrated my clients to better software and more robust operating system, I find that my business grows with them. Instead of spending my time patching and fixing - I spend more time programming and integrating. After migrating off of NT to OpenBSD for firewalls for example - they would ask me to firewall in users based on rank and lunch hour (port 80 would be open for all during lunch) for example.
Just my experience.
Re:Um..I'll have a shot (Score:2)
Regarding writing websites that work properly under IE, despite it's flaws: true enough, but it's also possible to build a mansion at the bottom of the ocean (at least nearish to shore). Sure, it would probably cost trillions of dollars, but it's possible. That doesn't necessarily mean it's easy. : ]
Re:Why should I care ? (Score:2)
It's worth pointing out that while FF certainly has it's share of leaks, in the *specific case* of JS garbage collection, it's much better than IE. Which is what TFA said.
Re:To be specific... (Score:2)
Re:Not use IE? (Score:2)
Re:Not use IE? (Score:2)
So maybe these "DHTML" developers are just narrowminded?
I mean I'm sure there are many Win32GDI applications that don't work in X11
Why would you limit yourself to just one platform when others exist [which often have more merit anyways].
Tom
Re:Not use IE? (Score:2)
Exactly the point the guy was getting at in the original article. IE has some memory leak bugs, and with the tool linked you can get around them without too much trouble, making your system more multi-platform without much fuss. People were complaining that they wouldn't want to develop for IE anyway, or that they could generally do without, which is a little close-minded for a web app.
Clearly it's valid when you completely restrict the terms (I'm writing for an intranet which only supports Firefox) but i
Re:Not use IE? (Score:2)
Re:Not true (Score:2)
Priniciples are important. I'm glad you stand up for yours.
-WS