Re: Significant performance degradation related to foreignObjects with scrollbars

Robert Longson <[email protected]>
Newsgroups gmane.comp.mozilla.devel.svg
Organization http://groups.google.com
Message-ID <6fda523e-5a20-41f1-ae3f-01c81221be5f@g17g2000prg.googlegroups.com>
On Nov 2, 10:00 am, "Steve Hazel" <[email protected]> wrote:
> Hi all,
>
> This set of problems look like three separate but related SVG issues,
> centering around foreignObject handling.  I have put together a test case to
> demonstrate the first two, accessible athttp://informal.mine.nu:10080/docs/ForeignObjectBugs.svg.
>
> The first two issues involve performance-degrading scrollbars in XHTML
> foreignObjects.
>
> 1. Scrollbars in XHTML foreignObject content cause significant rendering
> slowdowns across the entire SVG canvas.  The slowdown is approximately 18%
> for each additional scrollbar-displaying foreignObject, in my test case.

Without scrollbars i.e. if you don't have overflow, we can clip the
content to the viewing region and thereby optimise drawing. Since we
repaint everything (see below) clipping speeds things up I guess.

> The remaining issue involves a side-effect for XHTML foreignObjects when
> manipulating z-depth.
>
> 3. Z-depth (zIndex) control in SVG mirrors the DOM element order, but
> changing this order using appendChild, insertBefore or insertAfter causes a
> content redraw.  If this content is a foreignObject, it will be completely
> reloaded and re-rendered every time its drawing order, or that of its group,
> is changed.  Additionally, the foreignObject region, as described above,
> flickers each time this content is reloaded and redrawn.  This makes it
> impractical to dynamically manage shape drawing order, as required by an
> interactive application, due to the significant performance hit and the
> restrictions implied by the automatic (and seemingly unnecessary) content
> reload.  I can provide a video demonstrating the flicker, if anyone wants to
> see it.

We know this one it's https://bugzilla.mozilla.org/show_bug.cgi?id=418063

>
> If anyone has insight into or opinions on any of these issues, I'd be happy
> to hear it.  All of them look like bugs to me, and are serious enough to
> hinder meaningful SVG-based application development.  Unless otherwise
> indicated by someone more knowledgeable than myself, I'll be submitting them
> as bugs in hopes of getting them fixed sometime soon.

Patches are always welcome.

Best regards

Robert.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.