Bug 260468 - XSLT can take minutes to render with many <audio> elements
Summary: XSLT can take minutes to render with many <audio> elements
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-21 08:39 PDT by Jonathan del Strother
Modified: 2023-09-29 02:11 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan del Strother 2023-08-21 08:39:07 PDT
I'd like to use XSLT to transform RSS feeds into user-viewable pages.

When Safari renders lots of <audio> elements via XSLT, it behaves terribly - seemingly getting exponentially slower as the number of <audio> elements increases.

On a sample feed with 515 episodes, Safari 16.5.2 appears to freeze while loading the page for around 52 seconds on my M1 Macbook Pro. Meanwhile a 2016 MBP takes 3 minutes 10 seconds…

Firefox & Chrome both render the same page more-or-less instantly.

Here’s the sample page with 515 episodes: https://d1k0jgp8xx8zuc.cloudfront.net/jds/xsl/fish.rss
But for the sake of everyone’s sanity if you don’t want to sit there waiting for it to load, here’s a version with 100 episodes: https://d1k0jgp8xx8zuc.cloudfront.net/jds/xsl/fish-truncated.rss .  It ‘only’ takes 5 seconds to render, but hopefully that’s enough to demonstrate the problem.


(I've also filed this via Feedback Assistant, if that helps: FB12904190)
Comment 1 Alexey Proskuryakov 2023-08-22 13:02:02 PDT
It is a known issue that rendering a page with many media elements is pathologically slow, but I cannot find the tracking bug now.

Doing an outrageous amount of work under HTMLMediaElement::ensureMediaControls() -> HTMLMediaElement::setupAndCallJS() -> ... jsCSSStyleDeclaration_propertyValueForCamelCasedIDLAttribute() ... Document::updateStyleIfNeeded().
Comment 2 Radar WebKit Bug Importer 2023-08-22 13:23:16 PDT
<rdar://problem/114278433>
Comment 3 Alexey Proskuryakov 2023-08-22 15:16:03 PDT
rdar://113627244
Comment 4 Simon Fraser (smfr) 2023-09-28 14:34:43 PDT
This is covered by <rdar://77347577>.
Comment 5 Jonathan del Strother 2023-09-29 02:11:39 PDT
Could you let us know the status of rdar://77347577 ?