Skip to content

perf: optimize rendering time to resolve flickering issues during interaction with large data#243

Merged
antfu merged 3 commits intoantfu-collective:mainfrom
Emiyaaaaa:fix/flicker
Mar 3, 2026
Merged

perf: optimize rendering time to resolve flickering issues during interaction with large data#243
antfu merged 3 commits intoantfu-collective:mainfrom
Emiyaaaaa:fix/flicker

Conversation

@Emiyaaaaa
Copy link
Copy Markdown
Contributor

@Emiyaaaaa Emiyaaaaa commented Mar 3, 2026

  • <- Keep this line and put an x between the brackts.

Description

When the duration between console.clear() and console.log(something) is more than a certain time, it will cause the screen flicker.

So I do the following changes:

  1. Minimize the code between console.clear() and console.log(new display data) as much as possible
  2. For some code that has to run between console.clear() and console.log(new display data), optimize their performance

Before Change(40~60ms render time for 2000 package lines):

2026-03-03.11.12.47.mov

After Change(<5ms render time for 2000 package lines):

2026-03-03.11.11.06.mov

Linked Issues

fixes #107

Additional context

Should keep the flicker-demo in the project?

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.

Interaction mode flicker issue (交互模式闪烁问题)

2 participants