Jul 6, 2011 12:22 GMT  ·  By

Mozilla has been working on making Firefox lighter and faster, but Firefox 4 and Firefox 5 can still be quite the memory hogs sometimes. But the team is working on improving this and, already, some progress is being made such as a new patch that greatly helps with memory fragmentation, leading to a significantly smaller memory footprint in most cases.

A bug report was filed a couple of weeks ago, which alerted about an issue affecting memory allocation.

At the time, Gregor Wagner, a Mozilla contributor believed he had a solution for the problem, which was revealed to be accurate and a patch landed several days later.

"Some of our memory-bloat could just be fragmentation caused by long living system objects that keep a whole chunk (1MB) alive. The problem is that we don't use this information during allocation," Wagner wrote.

"A simple solution would be to use chunks explicitly for system objects or objects created by other origins. This should also reduce the workload for the coming 'mark-and-compact' collector, " he explained.

Since the patch only landed a few days ago, it will probably end up in Firefox 7, it was way too late for Firefox 6. Even this may be up for debate, as Firefox 7 is moving to the Aurora channel any time now and new patches won't be allowed.

That said, the results are quite impressive. Its effect will vary from case to case, since people are going to visit different websites and do different things, but whatever you're doing, the effect of the patch will be visible.

In one test, Firefox went from using 239 MB to just 189 MB in the patched version. What's more, after running "minimize memory usage," the footprint went down to 108 MB in the regular Firefox and just 21 MB in the patched one.