ampproject / ampproject/amphtml

[amp-story-player] (Performance)Decrease long task duration caused by loadPlayers()

Open
#29,736 1 comment 1 reaction 1 assignee Claimed by @gmajoulet View on GitHub
P3: When Possible Stale Type: Bug WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

Monitoring performance of the player I noticed a long task towards the beginning of the loading that is caused by `loadPlayers()`, which ends up calling several `appendChild()`s.

This is most likely called by the fact we don't batch these DOM mutations in a `vsync` / `resources` `.mutateElement()`.

![image](https://user-images.githubusercontent.com/5449100/89648031-9250a080-d88c-11ea-90b1-1aaf15dcdacf.png)

@ampproject/wg-stories

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.