Re: [svgwg] New element that prevents the creation of a DOM and treats contents as drawing instructions (#860)

The SVG in question is at <https://gist.githubusercontent.com/svgeesus/49e7c03a80751a43e49e1519499f5bb0/raw/4a37a71fd0355efd05bd89557ceb823b455b71f1/slice42.svg>. (I don't get a slow script warning on my machine, just a slow render (~1s) down the page, but it *does* freeze if I open the inspector.) It contains ~50k "pixels", each a tiny `rect` element; it's a very "wide" page, not a deep one.

Having a way to essentially opt the element into immediate mode would be pretty interesting here. Basically, then, it would become something like a `<script type=svg>` - retained solely as a text string that happens to conform to SVG grammar. You'd incur the cost of re-parsing/"executing" it on repaint, but I assume that's reasonably fine; drawing 50k pixels individually with `canvas` certainly doesn't take as long as rendering the SVG did on my machine, so I presume most of the cost is indeed in DOM creation, running into some algos that are at least slightly superlinear in children length.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/860#issuecomment-875828507 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 7 July 2021 18:24:13 UTC