Open Bug 869505 Opened 11 years ago Updated 2 years ago

SVG in Mozilla can be much slower than other implementations due to the overhead of display lists and layers

Categories

(Core :: SVG, defect, P2)

defect

Tracking

()

People

(Reporter: jwatt, Unassigned)

References

(Depends on 3 open bugs, Blocks 5 open bugs)

Details

(Keywords: perf, Whiteboard: [Australis:M-])

Switching SVG to display lists (bug 614732 et. al.) got us a lot of wins, but we're really hurting on large SVG files. Mozilla is often much slower than other implementations on large SVGs due to spending a lot of time building display lists.

My impression is that display lists generally seem to work well for large HTML documents, presumably because the elements are spread over a large scrollable area which means that only a relatively small number are ever on the screen at once. (I.e. only a relatively small number of display list items need to be created at any point in time.) This doesn't generally hold for large SVG files though, since usually _all_ the elements in the document are on-screen at the same time.
Blocks: 854024
Blocks: 869023
I guess we can tackle this by either making display-list building faster (which would benefit everything) or caching svg display lists (they already have their own invalidation code, right? Or wrong?) - or some other option...

When I last looked, it seemed that calculating the clip items was most of the work when processing display lists, but maybe I misread some details/I remember incorrectly - I'm not sure if it's really possible to cache the processing information (I looked and every idea I had broke dlbi in some way), but it may be possible to cache the clip regions and save doing the transforms to recalculate them every time display items are processed?

Would be good to get some layout people to comment on this I think...
Blocks: 801949
Clip handling should have sped up significantly with bug 841192. But I don't think it's likely to be much of an issue with SVG.

I think we should try to profile display list construction for large SVG documents and see what can be done to speed it up.

Retaining display list data between paints is theoretically possible but would be complex, so a last resort.
Blocks: 837985
Keywords: perf
Blocks: 754644
Blocks: 837335
Blocks: 780762
Depends on: 884148
No longer blocks: 837335
Depends on: 790861, 828240, 837335
Summary: Mozilla is much slower than other implementations on large SVGs due to spending time building display lists → Mozilla can be much slower than other implementations due to the overhead of display lists and layers
Summary: Mozilla can be much slower than other implementations due to the overhead of display lists and layers → SVG in Mozilla can be much slower than other implementations due to the overhead of display lists and layers
Depends on: 929691
Blocks: 921673
Blocks: 786064
Depends on: 934411
Whiteboard: [Australis:M-]
Depends on: 1103397
Priority: -- → P2
Blocks: 554004
No longer blocks: 921673
Blocks: 812310
Blocks: 1348837
Blocks: 1103397
No longer depends on: 1103397
Blocks: 964815
Blocks: 1348989
Blocks: 1325400
Blocks: 1509642
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 17 votes.
:jwatt, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(jwatt)
You need to log in before you can comment on or make changes to this bug.