Skip to content

Optimize pop to reduce interleaved layout writes#152

Open
rortan134 wants to merge 1 commit into
barvian:mainfrom
rortan134:optimize-layout-pop
Open

Optimize pop to reduce interleaved layout writes#152
rortan134 wants to merge 1 commit into
barvian:mainfrom
rortan134:optimize-layout-pop

Conversation

@rortan134

Copy link
Copy Markdown

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

vercel Bot commented Jul 27, 2025

Copy link
Copy Markdown

@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

barvian commented Aug 21, 2025

Copy link
Copy Markdown
Owner

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