Plugging Internet Explorer's Leaks
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."
Is such an approach also useable for finding firefox leaks? As a user (not developer, alas) I'm noticing that it invariably gets sluggish after some period of time, even with few pages open.
see a Text Widget
You can't not run on IE...
Um...I'll think you find I can actually.
The true source of IE memory leaks?
Korean outsourcing
here's something that helped me with this recently:
Mongrel News all the news that fits and froths
1. Open a new tab. Type "about:config" without quotes into the address bar and hit enter/click Go.
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 good recommended setting is 16MB. If you want 16MB, enter this value into the dialog prompt:
16384
(Why 16384 instead of 16000? Because computers use base-12 counting. Thus 16 megabytes = 16384 bytes. Likewise, if you want to double that and allocate 32MB, you'd enter 32768.)
4. Click OK to close the dialog box, then close all instances of Firefox and restart. If your Firefox still uses the same amount of memory, give it a few minutes and it should slowly clear up. If that fails, try a system reboot.
Everytime I try to download ten things firefox goes up to 300 megs of memory usage and 99% cpu usage. And I took the screenshots to prove it.
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.
The type of garbage collection Internet Explorer uses screws up when you use ActiveX objects (e.g. XMLHttpRequest) or the DOM. More information is available from the comp.lang.javascript FAQ notes.
Personally, unless I'm writing a web application, I say screw the users that use that substandard browser. Their browser will eat up more and more memory until they crash on some other website. This would have been fixed four years ago if Microsoft hadn't killed Internet Explorer development once they cornered the market.
due to this tool being out on the net, we will have more I.E. based memory leaks so that all I.E. computers stop running. Rejoice, the Internet will be free of this plague that we call Explorer.
would be sealing it in a cement box and chaining the lid shut. I cannot believe that after all the
...
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 the Secunia database."
http://secunia.com/product/11/
Join the Slashcott! Feb 10 thru Feb 17!
Actually, it's very easy to make a site not run on IE; as the following example shows.
.
<?
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>
Je fume. Tu fumes. Nous fûmes!
because it's your job?
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. Nowadays, you have one captain and a big computer. Currently, IT graduates, computer consultants and systems administraters are that huge crew of disease ridden reprobates, serving on the creaking, rotten, old fashioned Microsoft vessel. And all you want is to be out of a job?
Where's the logic in that??
Meine Schwester ist sehr, sehr reizvoll - Nietzsche
As I understand it, Firefox makes aggressive use of unused resources. If you're not having any slowdowns, then take a deep breath and realize that it's just doing what it's supposed to do.
If you do have accompanying slowdowns, then you have a specific, rare problem. See the other replies you've gotten so far for suggestions.
does it make this funny?
"funny" may not get you karma, but it can bring grins to dozens.
Mongrel News all the news that fits and froths
If you work around a problem, it hides from the user that the problem exists. The demand to have it fixed, therefore, dissipates and developers accept the onus to repeat work-arounds everytime they deploy something. Ultimately, the browser fails to improve, and the costs of errors are passed from the vendor (Microsoft) who never fixes the problem to the public (developers that waste time with work-arounds).
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.
looking for complicated solutions to simple problems? Use Firefox and you are done, without having to look for IE memory leaks. I know of peole that prefers having to solve very complicated problems with crashy win32 apps, then writing a couple of simple commands on the Linux prompt :-)
Wondering why i am doing so strange posts? I am trying to get a "+5,Flamebait" or "-1,Insightful" rating.
if you make links that contain '\'-s. IE will convert them to '/'-s and the webserver will convert the links to 404.
Szo
Red Leader Standing By!
I wonder if the upcoming IE7 will even fix these existing memory leaks.
Ant(Dude) @ Quality Foraged Links (AQFL.net) & The Ant Farm (antfarm.ma.cx / antfarm.home.dhs.org).
Please keep up the good work and maybe Microsoft will buy you. Or do we need to revert back to using netscape?
There's always sufficient, but not always at the right place nor for the right folks.
They are after all web apps. They run on a client browser. Browser instances come and go. Client computers get rebooted. We don't really make web sites that will slurp up all the resources on the client, but if there is a small leak, I'm not too worried. (Not saying it's a good thing though).
.NET) doesn't leak, your app stays nice speedy and responsive. Especially with web apps, client uptime is important, but not that important.
I guess as long a your development platform (whatever it is you use, we use
I am working on a farly large asynchronous web app and , well memory leaks are the norm, I am by session end , usaually an hour, consuming some 125 meg for the IE instance.
I will be using this on a regular basis. COOL Stuff at first glance, very cool....
This is very interesting, are memory leaks only a problem when running an application and the memory is returned when it closes, or is the memory gone and eventually you need to reboot?
Where does the memory leak to?
Once you've built your ship, that's it. No-one's going to try constructing a small mansion on top of it, regardless of its stability.
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.
For the love of God, please learn to spell "ridiculous"!!!
I develop web service applications for a pretty big printer/mailing facility in Los Angeles, and the web site requires all users to use Firefox (even on Mac). This company service hundreds of other companies, so there are thousands of users. Never once did anyone complain about having to use Firefox. I say web developer should just ignore the IE market share. Out of principal, I'll never again check to see if anything I do works on IE. Screw IE
If any of you would RTFA, you'd find that the tool doesn't address leaks in Internet Explorer: It identifies web page code that cause leaks because the developer coded poorly. It doesn't matter what browser you use, people can still write web pages that will cause it to leak memory...
I so wish that Mozilla ActiveX control were really ready to be drop-in replacement for MSIE ActiveX. So far it has issues that prevent this from happening (for once, tab key does not work in forms out of the box, or printing issues). I know that there are (probably) workarounds for those somewhere around but I'm just not all too ready to seek for those. Also - ActiveX for embedding Opera would be nice.
Reasoning: I find that most of the apps I've been working on can benefit greatly from being done mostly in Web-style interface (you know what I'm talking about). But still they need something that you won't get right from the browser (like scanner interface or similar stuff). Having hybrid web/classic(*) applications turns out to be the sweet spot - it is easy to do, it is easy to maintain, it works mostly great (*"classic" can be Delphi, VC, or some Python/what-not toolkit, or maybe even WinForms).
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 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.
Because your boss cares about selling product to IE users. If the users find bugs when your site is in their browser, they will not think 'If only I was using Firefox'. They will think 'What a piece of crap this site is, if the website is this bad I can't trust the product either, better find an alternative solution'.
In any case, when you're talking memory leaks you have a serious case of the pot calling the kettle black - hopefully the FF leaks will be sorted sooner than the IE ones (since FF seem to care about them and God knows MS don't) but right now FF is at least as leaky as IE.
I've been having problems with a java applet on IE. Every time the applet reloads in the web page the memory usage increases. Until it reaches 150mb or so then the applet can no longer load and error messages pop up. I'm hoping this program will help me come up with a solution. I don't have access to the applet's source code. Ideally I would just leave the applet in place in a frame, but it doesn't seem to take the commands that it is supposed to take. Has anyone else had trouble with memory and applets in IE?
Your trollish comment reminded me of this wonderful business adage.
Apathy - If we don't take care of the customer, maybe they'll stop bugging us. - E.L. Kersten, Ph.D.
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.
I have a problem having someone check my code who can't spell or use proper grammer. A swift click on a spell checker sure would add a lot of credibility to some whois telling you their code will check your's for it's grammer and spelling.
After all, people haven't been working around these problems so far, which caused customers to complain and Microsoft to fix these problems- which is why Internet Explorer doesn't have any leaks any more!
My Journal
Which brings me to...
Is it just me, or is anyone else sick of hearing "Just make your site standards-compliant and it ought to work everywhere...and if it doesn't, that's the browser vendor's problem, not yours"?
Of course it would be great if all browsers complied with standards. They don't. But you are the developer, so it is your problem to make your software the best that it can be for your users. If you have any energy left over after that, then go lobby MS to shape up.
If you ask me, you are a weenie if your solution is any of these:
- dumb down or uglify your site
- avoid any (actually useful) "AJAX" functionality because it is non-standard
- force users to use the browser of your choice due to your techno-religious
If you are a newbie amateur with more opinions than experience or knowledge, consider yourself forgiven. But if you are a professional developer, you need to do some soul-searching, baby.>>It's laughable to mock IE for memory leaks when Firefox is X (where X > 1) times worse at sucking up and retaining memory.
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).
Would we have the same basic post. Would we have it at all?
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.
I am glad to see that i made it so well.
Now that we understand each other, may I check your code for you?
...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 of Microsoft over the last 4 years with ie6? No, it can't, why should they spend money on fixing something that people use regardless.
I am NaN
If the OS starts to swap because one program is hogging up all the memory it will slow the machine possibly down what user will percieve as slow. Unused memory like memory leaks should be paged out from the physical memory, but sometimes (read: too often) this is not the case.
"He's over in Europe, plugging a dyke."
Vuja De: That sinking feeling that this is going to happen again. Often occurs in meetings with Product Managers.
log_2 12 = log 12 / log 2 = 3.58...
Man, this Google Calculator thing comes in handy.
--grendel drago
Laws do not persuade just because they threaten. --Seneca
OK, here's the transcript for the test talk.
Speaker: Good evening ladies and gentlemen, you are now rejoining us as our guest of this evening, Dr. Love, will answer questions from the public. And the first question is for the lady in the back. Go ahead dear.
Lady: Dr. Love, my computer is leaking memory when used intensively. What should I do?
Dr. Love: Well, even in normal use, we all leak a little memory from time to time. There's not much to do about that, but it's perfectly natural. But things only gets worse when you use your computer too intensively. That is not what they were built for, and you will most likely experience problems with its performance pretty quickly. There are some new cures on the market, but these are not without side effects. Really the best thing that you can do is simply turn it off every now and then. Give it some rest. You will see that it performs much, much better if you just let it time out for a second or two.
Speaker: Thank you Dr. Love. After the break: what to do if your computer just keeps hanging when you wanted to have it up and running.
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).
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 what a dead-end that is, and for putting in place viable alternatives.
you had me at #!
It might for two versions of Windows, anyway.
Funny how Mozilla can come up with a browser with better security and adherance to standards than IE6 for Windows 2000 but Microsoft can't.
Memory fragmentation is well known. That's true that there is no solution. But on the other side, there are technics one can employ to resist memory fragmentation.
Check memory pools. Network equipment uses them (you expect router/gateway to run 24/7). Check Linux kernel for slab allocator. It is not ideal - but still works quite well.
The problem one cannot solve is allocation of huge memory peice of continous memory. But on the other side, this is problem more specific to kernel.
User space applications are much less constrained, compared to kernel space tasks. It is just question of willingness of developers to solve the problem. It is just all things will have to be splitted into manageable pieces. Unfortunately, in some cases it is just impossible (e.g. second party libraries).
Web browser is quite complicated peice of software, with support of images, video, audio and various texts. Such changes might prove to be complicated to implement and maintain. With complications come bugs. I honestly rather relaunch Ff, rather have it crash by itself.
But then detecting things like memory leaks is quite complicated. You cannot be sure that item has to be decallocated and will not be deallocated some time later. Memory management is lazy. And you never can be sure about it completly. Saying that you have found memory leak, by just watching memory consumption going up is of no help to developers. And is not proof of application bug.
All hope abandon ye who enter here.
How come I've never run into this problem?
Right now I'm typing on my "testing" machine at work, which is an old HP Kayak running WinNT 4, P2/450mhz with 256M of memory. I have Firefox open (with between 4 and 8 tabs, usually) and I also have Outlook open (yeah, I know - my office uses Exchange and IMAP isn't open).
Suffice it to say, it works well enough that I never asked to upgrade this particular box. Granted, I do all my *real* work on my up-to-date speedy Linux machine (P4/2.8GHz/1.5GB memory), but I never had a problem with FF on this slower box. In fact, it runs significantly better than IE seems to.
My home machine is also pretty low-end, an old Athlon 700mhz with 256M of memory running Windows 98 (again, I know. I just use it for browsing and email and it's good enough). Again, it runs fine there too.
So basically I'm saying that I have three very different machines running different OSs, and I've honestly never seen an issue running Firefox. I do have issues running IE (though, interestingly it seems more stable when I run it using Wine on my Linux box than on the two Windows machines, but that could be because I appreciate that if it dies it doesn't take out the OS with it).
You can accomplish anything you set your mind to. The impossible just takes a little longer.
It's all about features.
See, first you ball all of the security patches together, and have them all download, even if the user already has them. That way, because it takes longer and is bigger, they think it's a more substantial application.
Second, you add some new features. Like stealing compression code from Stacker, MS will just steal one of the "Tabbed browsing in IE" Plugins and muck the variable names up a bit.
Finally, you tweak the theme. You gotta make it LOOK like a new browser. This is more important than anything else. If it LOOKS the same, people will assume it IS the same. This is why the OS has gotten so much eye candy with each release, it's to make sure the users KNOW they're on a new OS by it LOOKING cooler.
But fixing actual bugs? There's no real Return on Investment on that, so it won't be done.
"Live Free or Die." Don't like it? Then keep out of the USA
I can see no sensible reason why firefox is not linked against the Boehm collector. You can use that for hunting leaks, for tidying after leaks, and for skipping the whole manual memory management hassle in the first place. I'm not sure if the Boehm collector does compaction, but a sufficiently clever "conservative" GC can also compact (some) memory.
Nowadays the state of the art has moved on and there is no excuse, none at all, for malloc/free.
NOW you say there is a memory leak?
Um, people....check the DEVELOPER, not the Browser client.
Sheesh...
*nix peeps will believe ANYTHING...lol
----- Open Source = More Secure (mmmmkay)
It is easy to get more.
If you work around a problem, it hides from the user that the problem exists. The demand to have it fixed, therefore, dissipates and developers accept the onus to repeat work-arounds everytime they deploy something. Ultimately, the browser fails to improve, and the costs of errors are passed from the vendor (Microsoft) who never fixes the problem to the public (developers that waste time with work-arounds).
The problem with that is that most Joe Users out there will think that your website is the one crashing their computer, NOT IE. Most people will be complaining that your website is broken, and will not be complaining on any MS forums about how Internet Explorer is leaking memory...
I have a better idea. There should be a worldwide law that states that all websites must make every effort possible to crash MSIE, but run well on all other browsers. The reasoning is that by eliminating MSIE, much of the risk associated with cybercrime will disappear with it.
All this about Firefox. Firefox was originally conceived as 'Mozilla Light'. It WAS Mozilla Light!
Firefox has nowhere near the adjustability that its parent, Mozilla, has. I mean Mozilla, not Netscape the company now owned by the corporate monopoly that has screwed its seed into it, AOL. Mozilla has all the features that one would ever need except one. You have to open letters in order to view them, and IE has a way through its property pages to allow the safe viewing of dangerous mail. Firefox, in an effort to emulate IE more closely, has duplicated some of IE's nastier bugs by not letting one selectively limit damaging content into your machine via HTML and Javascript. Get with the program people, have a GOOD look at Mozilla before just blindly going with Firefox. Whatever you do, don't trust IE, and really look to the stopping Outlook Express from automatically opening mail. Never use Outlook as it is so bad that only a fool or a corporation would use it.
Using non-standard MS-HTML to promote non-MS standard-compliant browsers? You heathen!
I bet Microsoft didn't see this coming :)
Not Buzzword 2.0 compliant. Please speak english.
But your inflammatory tone would be really cool if our open source alternative in Firefox were somehow better. Right now, Firefox is using 373M on my computer (334M resident) with three windows open, none of which have anything bigger than this /. page. Mozilla is using 279M (I'm also running it) with a single page open. Firefox usually gets up to around 600-700M over the course of 3 or 4 days, after which it generally just dies. Otherwise, I have to kill it due to its slowness.
Why not leave IE to Microsoft; put your effort toward something you can actually fix rather than being an ankle-biting ass.
Do you have ESP?
Why should anyone write type-safe, bounds-safe code to prevent buffer overflows? If we do that, we're hiding the fact that such overflows can possibly happen from the users, and reducing the demand for people to fix the programming languages and save us from our own poor design.
WTF?? When did suggesting good design practices to optimize your code to run on the platform most users will use become a BAD thing?????
You can't not run on IE You can not not run on IE, which means you can, or was this something the editor overlooked?
Haahaa! :-))
But you can't. Unless you decide to stop browsing your hard drive using Windows.
IE is embedded deep within Windows Explorer. Next time you wonder, try punching in a website into the address bar for My Computer.
Mercy was given to me by Christ...I must give the same to others.
I use IE6, Mozilla and Firefox all the time for different purposes. I never have to restart IE, but Mozilla has to be restarted every two days or so because it has sucked up over 100 megs of memory! I have one instance with about four tabs open. The only active tab is gmail -- the other three I just refresh once or twice a day.
I've never had the same problem with IE.
Oh yes I can. When I do for-fun sites, and I need some feature like translucent PNGs, that I feel MS hasn't made a good faith effort to support, I drop IE compatiblity and put an add for Firefox on the page.
Until many people start doing this, then suckers won't switch. And suckers are the bulk of the internet.
I'm not a Geek so test it out for yourself.
I had an FF glitch a while back so I cruised their forums for an answer. Apparently if you clean up the downloads window FF runs like a Masseratti on High Octane. Tools > Downloads > "Clean Up"
The more crap you got in there the poorer FF performs. I think its tracking the downloads or something in every tab which taxes the system and creates a lot of bizarre glitches.
I've been running FF regularly now with no problems what-so-ever, as long as I dump the downloads regularly.
BTW this solution occurred to me because of the following post:
"Well if you happen to browse sites with pictures and you open each picture in a new tab, save the picture, then close the tab, then you eventually get to the point where working with the browser is impossible until it is restarted (don't ask how I know that!)."
See, you guys got to lay off the porn! The guys posting problems with FF need to get out a little more! A browser can handle just so much before even it gets grossed out.
Maybe this tool is not useless for us.
--Microsoft.
It's a little sad that when you raise this issue, you immediately think of .NET. Java was there first. But Sun's early Java implementations actually had pretty severe memory leaks, firmly establishing Java's reputation as a low-performance platform.
Anyway, it's a moot point. All the major browsers are implemented in C++, which doesn't support VM-style memory management. There used to be several Java-based web browser projects, but none of them really got beyond the demo phase.
It's equation fifteen on this page.
Happy to help!
--grendel drago
Laws do not persuade just because they threaten. --Seneca
It's really base 2. 12 was a typo.
In decimal(base 10), 1 meg = (1k) x (1k)
In base 2, the nearest thing to 1000 in decimal (base 10) is 2^10 or 1024 and that is normally called 1k when you are referring to computers (which use binary)
So (for computers), we still say 1meg =(1k) x (1k) , but since we are referring to a base 2 munber, we are really saying 1meg = (1024) x (1024).
Now back to the Firefox entry of 16 megabytes:
16 megabytes = 16 x 1024 x 1024
Firefox wants you to enter the number in binary kbytes so
16 megabytes is entered as 16 x 1024 = 16384 kbytes.
Just keep in mind that any time you are referring to bytes, you are referring to 1024.
I have never had this problem so you must be wrong and by the way have your reported this non-problem to the Firefox design team so they can do nothing about it since as I said before, it can't be a problem?
I have limited Firefox's memory considerably with this:e mcache
http://www.mozilla.org/support/firefox/tips#oth_m
user_pref("browser.cache.memory.capacity", 16000);
I don't know of such a setting in IE but maybe there is some registry key that needs adding or tweeking.
Actually, yes. Both Javascript and plugins were a big departure from standards.
The current problem with the W3C is that it has it's own agenda outside the relm of the major implementors. Instead of trying to determine which vendor extensions should be incorporated into the standard, it wants to create its own new features. Since it has no power to force the implementors to follow, it's mostly ignored. The W3C is becoming more irrelevent each day.
Actually, since a lot of the AJAX memory leaks are due to the external ActiveX XMLHttpRequest objects that Mozilla just built in to the browser, ...one might argue that Mozilla has sidestepped this issue by NOT adhering to standards by including their own XMLHttp implementation inside their object model.
I mean, unless you can tell me which version of JS standards support XMLHttp??
I am reminded of a very popular message board community whose site does not display well in IE. The admin just got fed up with dealing with IE's crap, and decided to just write standards compliant code with CSS. There's even a Firefox Toolbar, and a get Firefox link on the news page. See http://www.4chan.org/ WARNING:NSFW!!
When I read the article blurb, I immediately thought that I wanted the opposite.
I'd like to know what features I can put on a web page that will cause IE to leak memory as quickly as possible, but not cause any harm to Firefox.
That way I can sneak the appropriate code onto every web site I build, until people get so sick of IE running slow and swapping like mad that they switch to Firefox.
Anyone have any recommendations?
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
why is there a Microsoft ad on this page (and many others on /.)?
There is a Midnight Commander clone for MS Windows and it works reasonably well.
"The likes of Facebook and WhatsApp are free to those whose privacy is of zero value."
My own web site does it... www.jms1.net... or for those not using IE, www.jms1.net/ie.html is what the IE people are seeing. (And before every moron on the planet decides to tell me this at the same time, I already know you can use google's cache to view the site.)
Surely I'm not the only person out there who excludes IE from accessing their web site?
(Self-slashdotting... is that like suicide?)
Turnabout is fair play.
I have heard the rumors that MS disbanded the IE dev team. I see them as "possibly valid". Overall, I don't care about it... I use Konq most of the time. However, I will take some time to point out a few flaws in your reasoning. :)
otherwise where is IE7 coming from??
Could it be that Microsoft, along with it's power to disband teams, can also put them together? Is such a thing impossible?
If you've ever done any serious app development you'd know that the work going into the product in the first few versions FAR outweighs the last few. Later versions of applications are often refactoring or building on your existing base.
Actually, that only applies for software that you don't plan on supporting. Software maintenance accounts for over 75% of the computer programming industry. This doesn't only include refactoring and adding/changing functionality. Finding and fixing bugs and security exploits is the most important aspect.
Even excluding that, new standards for internet document design come out all the time. The past few years have seen the fall of HTML for XHTML, and CSS2 will be succeeded by CSS3. That alone should cause microsoft to have a full contingent of staff working on IE.
2. If you've ever taken a look at microsoft's roadmap throughout the mid-late 90's & early 2K you'd know why they needed many more developers; During that time they launched Win95 (new OS codebase), NT4, WinXP, and Win2K. Dramatically different and new OS's and APIs requiring a lot more developers at the time.
This point is already covered by my last paragraph--Web standards have sped up, not slowed down.
Also, Microsoft claims to be incredably innovative, but what innovations have they touted with their browser?? None. Nada. Nothing Zip. Zilch. Zero. They haven't even add tabbed browsing in the past 4 years... (Yes, I know. IE7 has it)
Meanwhile, let's look at how KDE has chosen to innovate their browser (I look at konq b/c I know it better than Mozilla):
That in itself lends particularly well to the credability of the rumor.
2 point 2's? heh. Sorry, just had to be a pedantic bastard.
I'm yet again seriously tempted to start forcing IE to load popups saying "Your system requires one of these browsers to continue" with links to standards supporting browsers.... and perhaps load a page with a big blue question mark in the center.
Or better yet, let them continue, but throw a warning popup that their system may become unstable if they continue... then crash IE with some trivial bit of code.... but this would take some kind of widespread grass roots movement to become effective.
Non sequitur: Your facts are uncoordinated.
but you can not not run IE!
Well, there is such a thing as concurrent garbage collection, which, as far as I know, is still basically experimental. The default garbage collection scheme in the Sun JVM (of which there are several) IS triggered by being unable to allocate space on top of the heap (due to its being full). When a GC is triggered, ALL threads are locked down during the GC, so nothing can be mutated which the GC goes through it's "mark" phase of flagging live objects. It then runs through the heap and compacts all the live objects, leaving all the empty space at the end of the heap. Then only at that point, does it allow the VM to continue running.
Also the way Sun's JVM's stupid thread priority system works, a lower priority thread only executes when no threads of higher priority are "runnable", meaning they are all blocked. This makes it VERY easy to starve out lower priority threads, unless you are careful to ensure that ALL threads are in a not-runnable state - asleep, blocked, etc - periodically (hopfully when they don't have any work to do). Obviously the GC works even if you do a tight while (true) { new blah[100]; } loop in a higher priority thread.
-If
Run a pencil-and-paper RPG campaign with your far-off friends: Gametable!
The most irritating part of Microsoft's "innovation" for me, when I was a web developer, was when Microsoft ensured that all of their Javascript example code in MSDN used curved brackets () for array accesses instead of square brackets []. There was no difference nor advantage of supporting curved brackets except to provide yet another way that naive developers could accidentally make their code incompatible with non-IE products.
Trying to fix thousands of lines of co-worker's copied-and-pasted code was a nightmare.
...the reality of the situation is hilarious enough:
.oh my! and the site hosting this tripe is hideous! :D
It's a little sad that when you raise this issue, you immediately think of .NET. Java was there first
.Net are younglings when it comes to GC, and you complaining about him gyping Java is no less sad than him gyping Java.
It's a little sad that you think of Java when complaining that he didn't think of the first. There were PLENTY of GC'd languages before Java came around.
Java came out 1995ish. I'm pretty sure Smalltalk was GC'd, and that was from 1969. I'm pretty sure Simula was GC'd, and that was from 1964.
So really, both Java and
I didn't mean to bring up .NET first, or anything-- point is, that .NET is pretty good. It's no use denying it just because it's from Microsoft.
.NET. Still, .NET does most things right, as well.
.NET platform, more software will come to adhere to that frameworm, seeing as how most desktops are still run with Microsoft software. Hopefully the industry will stay competitive and technology will continue to progress.
I'll readily agree that Sun's first implementation left a lot to be desired. They shaped up nicely and added a lot over time. Their JVM is pretty nice these days and should be competitive with
It really shouldn't matter who comes with the right technology. As far as I can see, Microsoft's solution is as open as they've ever been. It's all about the level of real implementations that are out there right now that *work*.
I suppose that when Microsoft introduces more of their software on the
JavaScript is supposed to have automatic memory management. These leaks are fundamentally caused by bugs in Microsoft's implementation of that.
Here's an example.
But the memory management for JavaScript and the memory management for native browser components are separate and cannot communicate.
Suppose that a form element's event handler is a closure with a reference to another form element. (You would get a performance boost if you could do this, and it also simplifies a bit of code.)
When you run it on IE you'll leak the entire page, every time you load it. The JavaScript memory management system will not unload the handler because it is referenced from the form element that it is a handler for. The memory manager for the rest of IE won't unload that form element because it is referenced by the page which is referenced by the form element that the closure is pointing to.
The entire point of having true memory management (rather than reference counting) is that circular loops like this should get cleaned up properly. We've known how to do that for decades. But Microsoft forgot the most basic lesson, to make this work properly you need to have only one component in charge of all of the memory.
In fact I'll go so far as to say that while it is true that people can build pages that take a tremendous amount of memory to load, and developer error can cause you to leak memory while the page is sitting there, any memory leak that lasts as you navigate from page to page is due to bugs in the browser. (And IE has plenty of them!)
In fact "can't" actually means "not can". So saying "You can't not do this" means "You not (can not do this)" which translates to "You must do this."
But Smalltalk never got anything like the acceptance that Java got. It was just too far away from the way most programmers work. So even though there have been first-rate Smalltalk implementations from the very beginning -- and work on Smalltalk continues to this day -- it's never been a major contender as a programming language.
Java, by contrast, made enough comprimises with C++-style programming to be quickly accepted by professional developers. Perhaps a little too quickly, because Java's reputation for poor performance was firmly established by the horrible VMs and compilers Sun released early on.
So now .NET what people first think of when they think of VMs, because Microsoft has grabbed the ball that Sun dropped. They'll certainly drop it too, but that only makes it even more sad.
There are GC algorithms that can be done in realtime (meaning known bounded time). They're slower, but they exist.
Also don't assume that malloc/free are realtime! malloc/free has to traverse a free list, and will usually coalesce, sort and categorize blocks. new/delete in C++ may also run arbitrary amounts of setup or finalization. Depending how the free list is organized, deallocation order may affect performance in odd ways.
If you're coding for hard realtime embedded apps, you shouldn't malloc. Predefine buffers or design the algorithm so it doesn't use heap.
See here.
Anything above writing your own heap allocator over raw OS calls is "a crutch". It's merely a matter of choosing the right crutch.
File handles and network connections? That's none of the GC's business. The algorithm deals with that stuff - GC is there to save you the hassle of asking "who owns this object to delete it" and "is this pointer still good". GC lets you nest function calls in the knowledge intermediate objects won't leak. It lets you grab an arbitrary object and point to it from a data structure without worrying it will become invalid. It's not there to do shutdown housekeeping, that's a C++ism.
Anything above writing your own heap allocator over raw OS calls is "a crutch". It's merely a matter of choosing the right crutch.
Even writing your own allocator could be considered a crutch. Using a the operating system? Pshaw! Real men talk to the metal directly. C is a crutch. So is assembly.
In short, I agree with your point completely. I've written microcode, when I had to. I've designed special purpose hardware (with the help of an EE to keep me from making too many dumb-programmer blunders) when it was needed. But 99.9% of the time I work with the strongest crutches I can find--though I tend more to think of them as power armor.
C programmers who think they're living on the cutting edge of something should look around more.
--MarkusQ
"..You can't not run on IE.." I take the point, but personally I can't imagine ever pandying to internet explorer ever again as long as I live. I couldn't care less if my "errors" cause people who use my sites difficulty, that's there look out for being stupid enough to use Windows in the first place. Buy a proper computer that runs proper software by people who know how to write good code, end of problem.
http://electricguitarlessons.blogspot.com