Loading big XML file makes Firefox and even the windows system unusable
Categories
(Core :: XML, defect)
Tracking
()
| Performance Impact | medium |
People
(Reporter: hodollsoft, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0
Steps to reproduce:
Opened that URL:
https://girotti.com/media/amfeed/feeds/gm_pr_factory.xml
Actual results:
Firefox immediately slows down, than tabs are almost not accessible, the windows 10 system starts lagging and is barely usable.
Expected results:
Load the XML file and do not affect anything else while doing so, only the tab with the XML loading at most.
Comment 1•2 years ago
•
|
||
https://share.firefox.dev/4gKa1gm
Not sure the profile is valid, as I struggled to get the page to open (had to kill the other tab and reload).
Worth noting that I used the local XML, not online, but a lot of time seems to be spent on Network anyway.
Comment 2•2 years ago
|
||
This bug was moved into the Performance component.
:hodollsoft, could you make sure the following information is on this bug?
- For slowness or high CPU usage, capture a profile with http://profiler.firefox.com/, upload it and share the link here.
- For memory usage issues, capture a memory dump from
about:memoryand attach it to this bug. - Troubleshooting information: Go to
about:support, click "Copy raw data to clipboard", paste it into a file, save it, and attach the file here.
If the requested information is already in the bug, please confirm it is recent.
Thank you.
Comment 3•2 years ago
|
||
Most of the time seems to be spent constructing the DOM in the XML parsing. Chrome does not seem to struggle as much and the slowness affecting the entire browser is unfortunate.
The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.
Platforms: [x] Windows [x] macOS [x] Linux [x] Android
Impact on browser: Causes noticeable jank
Page load impact: Severe
Websites affected: Rare
[x] Able to reproduce locally
| Reporter | ||
Comment 4•2 years ago
|
||
| Reporter | ||
Comment 5•2 years ago
|
||
Here is the profiler: https://share.firefox.dev/3XVvUAU
This profile is taken with Firefox Developer edition and includes all possible data.
The most obvious thing for me is the increasing high memory usage, which normally explains that even my system gets barely usable after 4-5 minutes.
Comment 6•2 years ago
|
||
The severity field is not set for this bug.
:masayuki, could you have a look please?
For more information, please visit BugBot documentation.
Comment 7•2 years ago
|
||
According to the profile, nsXMLPrettyPrinter::PrettyPrint runs most time. txMozillaXSLTProcessor::TransformToFragment and nsINode::AppendChild are the expensive calls in it. About the latter case, inserting <details> causes synchronously initializing its shadow tree and that take a lot of BindToTree calls. If we could do it later, we could improve the performance. About the former, I don't have enough knowledge.
Could be S2 if this can be used as DoS attack? Feel free to downgrade this if it's not so critical.
Comment 8•2 years ago
|
||
I think that the simplest solution here is, limit the XML file size to execute the pretty print.
Comment 9•2 years ago
|
||
Changing to S3 because XML pretty-print seems like something that users don't run into so often. There are plenty of other ways to DOS in a browser.
| Reporter | ||
Comment 10•1 year ago
|
||
Would you please consider to make it at just to load without dragging down the system by disabling the pretty print above certain XML size? I think that UX will be much much better, because the user than can simply download the file or close the tab without affecting its browsing session and even the OS. I can say it is not rare event in my work to load big XML files. Please consider some simple solution, because this is really annoying for someone who likes to work with Firefox at scale, daily.
Description
•