Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: avoid layouts thrashing #3764

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: avoid layouts thrashing #3764

wants to merge 12 commits into from

Conversation

bytemain
Copy link
Member

Types

  • 🎉 New Features

Background or solution

  1. 使用 fastdom 来批量化写入和读取操作
    当我们在获取浏览器的布局时,如果当前有未应用的布局,浏览器会强制应用该布局。

所以我们其实不太需要每一次都获取最新的布局,仅获取上一帧的布局信息即可。

使用一个工具包 fastdom 来做到这一点。

  1. 原来的 monaco 的渲染时机是在 react 渲染完的下一帧

这是因为 monaco 监听了自身的 dom 变化(有个配置项),再 layout 自己,关掉这一项,由外层来 layout 它即可

Changelog

avoid layouts thrashing

Copy link

railway-app bot commented Jun 12, 2024

🚅 Deployed to the core-pr-3764 environment in core

Service Status Web Updated (UTC)
core ❌ Build Failed (View Logs) Web Jun 12, 2024 at 3:26 pm

@opensumi opensumi bot added the 🎨 feature feature required label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 feature feature required
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant