Closed Bug 247340 Opened 20 years ago Closed 20 years ago

opening large XML file in Mozilla is _extremely_ memory and CPU consuming

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 197956

People

(Reporter: z-mozilla, Assigned: hjtoi-bugzilla)

References

Details

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124

Opening a 5MB of very simple XML document (max. depth 3, only a few types of
elements) in Mozilla window consumes over 500MB. Even after the whole document
has been parsed, Mozilla response time is terribly slow. My system is Athlon
2400+, 512MB RAM, so it's not some slow junk. 

By comparasion MSIE parses same document not only faster, but also consuming
only 60MB of memory.


Reproducible: Always
Steps to Reproduce:
1. Open a large XML document
2.
3.

Actual Results:  
Document opens very slow, Mozilla-bin eats up memory, and is extremely slow to
respond to user commands (eg. switching to different tab or window).


Expected Results:  
Performance at least comparable with MSIE 

I do not attach XML file, becouse it contains sensitive data. Should you need
it, I could generate one with fake data.
If your file uses XSLT stylesheet it is a known issue (see bug 197956). (Note
that if it has no stylesheet in itself, Mozilla assigns it a default XSLT
stylesheet which provides the IE-like tree view.)
Whiteboard: DUPE 197956?
(In reply to comment #1)
> If your file uses XSLT stylesheet it is a known issue (see bug 197956). (Note
> that if it has no stylesheet in itself, Mozilla assigns it a default XSLT
> stylesheet which provides the IE-like tree view.)

Is there any chance that this will be fixed in forseable future? Are you planing
to switch from Expat to more effective libXML2 and libXSLT anytime soon?

How about workaround, is it possible to display XML without XSL[T] as plain text?
  
(In reply to comment #2)
> Is there any chance that this will be fixed in forseable future? Are you planing
> to switch from Expat to more effective libXML2 and libXSLT anytime soon?

No plans as far as I know. It would need a volunteer to do that. I heard Jonas
Sicking was working on integrating a validating parser into Mozilla, but it may
have been a hack - dunno.

The last time we looked at integrating libxml or libxslt it looked like it would
have been extremely difficult to do (2-3 years ago), because of difference in
how Expat and libxml were intended to be integrated into products.


> How about workaround, is it possible to display XML without XSL[T] as plain text?

Yeah, serve it as text/plain mime type. Easiest thing to do would be to change
the file suffix to .txt, for example.

Mozilla would also handle your XML fast if you provided a CSS stylesheet for it.
Depends on: 197956
*** Bug 266895 has been marked as a duplicate of this bug. ***
Marking as new based on other dupe.  Does anyone know if XLST has anything to do
with either instance of this bug?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Bug 266895 does not have a stylesheet, so we assign the default XSLT
transformation to it, and since that is slow it is bug 197956. There is no
testcase here, but based on comments I believe this is the same issue, so again
bug 197956.

Btw, another workaround would be to prepend view-source: to the URL - that way
it won't go through XML processing.

*** This bug has been marked as a duplicate of 197956 ***
Status: NEW → RESOLVED
Closed: 20 years ago
No longer depends on: 197956
Resolution: --- → DUPLICATE
Whiteboard: DUPE 197956?
v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.