Closed Bug 436150 Opened 13 years ago Closed 10 years ago

Firefox can't handle large .xml files


(Firefox :: File Handling, defect)

Not set





(Reporter: titcouille.mandriva, Unassigned)



User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080208 Mandriva/ (2008.1) Firefox/
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080208 Mandriva/ (2008.1) Firefox/

Often on Linux systems, .xml files are associated by default with Firefox. However, in my experience, Firefox doesn't handle .xml files over 2 Mb. When I double-click a large .xml file, Firefox opens up, but becomes unresponsive and ends up eating all my computer's memory. Smaller files, under 2 Mb, eventually display, but even then, it takes lots of processing time. I suppose the biggest slowdown is the XML syntax highlighting and fancy page formatting that Firefox does. It would be nice if Firefox truncates large .xml files, instead of trying to display them entirely. Currently, whenever I double-click a large .xml file by mistake, I have to terminate Firefox forcefully.

Reproducible: Always

Steps to Reproduce:
1. Open a large .xml file in Firefox.
I'm confirming that this bug is still affecting new Firefox release and Windows version too. It rapidly consume all CPU resources making it difficult the kill the Firefox process. The memory grow quite fast too, a ~7MB xml file I've tried to load completely uses nearly 1GB of memory, that seems like really too much. 

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008120122 Firefox/3.0.5
confirming in windows. i have 29mb long xml file, when i try to open it in firefox it allocates 616MB of memory and stays there....i guess forever, because its still running after 4 hours without showing anyhting

for comparison, internet explorer 7 shows first lines immediately...unfortunately soon it allocates about 3GB of memory (+swap) and crashes 

so its definitely problem in too huge xml file - but still, isn't there any way how to make it work better, or at least show some warning/error instead of making browser unresponsive?

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009021910 Firefox/3.0.7
Same problem. 7MB gives 1GB and the system is stuck.
Maybe we could have a sliding "window" of nodes (depth is dynamically calculated) after an initial full-tree validation ? This would allow having reasonable memory usage.
Blocks: mslim-fx5+
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 291643
You need to log in before you can comment on or make changes to this bug.