Skip to content

Conversation

@rortan134
Copy link

What

Previously this method interleaved layout reads (e.g., offsetTop) and writes (e.g., style updates) in a loop, forcing multiple browser reflows per character (O(n) layout calculations. Forced reflows: now O(1) instead of O(n))

@vercel
Copy link

vercel bot commented Jul 27, 2025

@rortan134 is attempting to deploy a commit to the Barvian Team on Vercel.

A member of the Team first needs to authorize it.

@rortan134 rortan134 changed the title Optimize pop() to reduce interleaved layout writes Optimize pop to reduce interleaved layout writes Jul 27, 2025
@barvian
Copy link
Owner

barvian commented Aug 21, 2025

Hey, thanks a lot for the PR! I acknowledge there's definitely layout thrashing happening in the current implementation and am working to resolve it at a higher level. Not sure if I'll incorporate this into that work yet, just thought I'd let you know!

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