Skip to content

Conversation

TrySound
Copy link
Member

We have html element mutations in a few places and each can add ~250ms of repaint time on large projects. Here I got rid of it in two places

  1. Collapsed logic enforced document height to preserve scroll position. Instead I created an absolutely positioned div which enforced scroll where collapsed elements are reset.
  2. Scroll into view logic defined position absolute on scroll container. Though it's not necessary on html element so just ignored it.

We have html element mutations in a few places and each can add ~250ms
of repaint time on large projects. Here I got rid of it in two places

1. Collapsed logic enforced document height to preserve scroll position.
   Instead I created an absolutely positioned div which enforced scroll
   where collapsed elements are reset.
2. Scroll into view logic defined position absolute on scroll container.
   Though it's not necessary on html element so just ignored it.
@kof
Copy link
Member

kof commented May 30, 2025

Tested on the HugeProject if you search for it in dashboard we have one, the difference in performance is HUGE.

@TrySound TrySound merged commit 24180a2 into main Jun 1, 2025
17 checks passed
@TrySound TrySound deleted the select-perf branch June 1, 2025 11:42
TrySound added a commit that referenced this pull request Jun 4, 2025
We have html element mutations in a few places and each can add ~250ms
of repaint time on large projects. Here I got rid of it in two places

1. Collapsed logic enforced document height to preserve scroll position.
Instead I created an absolutely positioned div which enforced scroll
where collapsed elements are reset.
2. Scroll into view logic defined position absolute on scroll container.
Though it's not necessary on html element so just ignored it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants