Welcome to WebmasterWorld Guest from 34.204.176.189

Forum Moderators: open

Message Too Old, No Replies

Firefox's memory leaks are a feature of Firefox

     
4:28 pm on Feb 17, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:May 20, 2003
posts:493
votes: 0


I just read this on yahoo's news (I'm a bit surprised that something this technical would be on a mainstream news site like this):

[news.yahoo.com...]

"What I think many people are talking about however with Firefox 1.5 is not really a memory leak at all. It is in fact a feature," wrote Goodger.

Goodger went on to describe how Firefox 1.5's Back-Forward feature caches recently-viewed pages so that they're immediately available when users click the Back or Forward navigational buttons.

"This can be a lot of data," Goodger said. "It's a trade-off. What you get out of it is faster performance as you navigate."

Now, I believe that this is what Opera does as well and I've had memory problems with that - is this the same issue probably or something entirely different?

Jennifer

6:33 pm on Feb 17, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


Memory leaks can be difficult to trace but are easy to prove.

Does anyone know what method of measuring memory usage is being employed to measure this memory leak? If people are simply using the task manager, then the possibility exists that there is no leak - rather, Firefox is simply not releasing (to the operating system) the allocated memory. This is a common strategy used to speed memory (re)allocations.

How to test for a leak.

1) Take note of initial memory usage.
2) Open a load of pages in a predetermined order.
3) Take note of memory usage.
4) Close all pages in reverse order.
5) Take note of memory usage.
6) Reopen same pages in same order.
7) Take note of memory usage. It should be approx measurement 3).
8) Close pages in forward order.
9) Take note of memory usage. It may still be approx measurement 3) if memory is pooled rather than released to the operating system.
**Ideally, these tests should be carried out with caching in a default state and repeated with caching both switched off and in a maximum state - I'm not sure how this could be achieved in FF.

In other words, repeatedly opening (and closing) the same pages should not result in a net increase in memory usage. HOWEVER, simply closing a set of pages will not necessarily restore memory usage to a prior level (because the allocated memory may be kept for future use rather than released to the operating system in order to speed performance).

I haven't followed the discussion of this problem nor conducted any tests myself, but this might explain why some people believe FF leaks memory and others don't.

Kaled.

[edited by: kaled at 6:38 pm (utc) on Feb. 17, 2006]

6:38 pm on Feb 17, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 23, 2005
posts:742
votes: 0


It has to do with cacheing of pages. FF caches a number of pages per tab and keeps them in memory. Some thought this was caused by a leak but it is not.
6:52 pm on Feb 17, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Good test description, Kaled.

With the page-caching obscuring real leakage, the only way Joe-user can detect a memory leak is to see if Firefox can be used for several days or weeks without filling up memory. But the old days of 'getting away with leaks' are gone, now that newer NT-based windows versions will actually run for days or weeks without a restart...

Jim

8:11 pm on Feb 17, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member kaled is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 2, 2003
posts:3710
votes: 0


I think it's also worth pointing out that unless Firefox is very badly behaved, closing it completely should release any and all memory allocated to it. I think it's possible to allocate memory that isn't guaranteed to be released when a program closes but I can see no reason why Firefox would do this.

Even if there is a leak in the rendering engine due to something like a pen or brush not being released after use, Windows will release all these handles and their associated memory when an application is closed, even if closure is achieved using the Task Manager because the application has crashed. That even applies to Win9X not just NT/2000/XP

Kaled.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members