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: improve workspaceService initialize speed #1824

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

life2015
Copy link
Member

@life2015 life2015 commented Oct 24, 2022

Types

把工作空间连接过程中对workspace uri的watch优化成异步操作。
进而优化工作空间连接速度。

  • 🚀 Performance Improvements

Background or solution

通过对工作空间连接过程的耗时分析与打点,发现在Storage初始化过程中会依赖workspace-service.ready,而workspace.ready需要等待watch完成。
watch的耗时大部分情况下需要300ms左右,但是在容器不稳定的情况下可能需要4s甚至更多,而且watch本身不应该阻塞工作空间的启动,因此做了异步处理。会优化极端情况下的工作空间连接速度。

附件:某些极端情况下的watch耗时
image

Changelog

  • improve workspaceService initialize speed

@life2015 life2015 requested a review from Aaaaash October 24, 2022 08:44
erha19
erha19 previously approved these changes Oct 24, 2022
@erha19
Copy link
Member

erha19 commented Oct 24, 2022

@life2015 这里标题和 Changelog 是不是可以修改成 “improve workspaceService initialize performance”

@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Base: 57.60% // Head: 57.59% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (532335c) compared to base (dd88924).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1824      +/-   ##
==========================================
- Coverage   57.60%   57.59%   -0.01%     
==========================================
  Files        1285     1285              
  Lines       80211    80212       +1     
  Branches    16806    16806              
==========================================
- Hits        46203    46197       -6     
- Misses      30933    30939       +6     
- Partials     3075     3076       +1     
Flag Coverage Δ
jsdom 52.34% <100.00%> (-0.01%) ⬇️
node 15.90% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ackages/workspace/src/browser/workspace-service.ts 72.23% <100.00%> (+0.06%) ⬆️
packages/utils/src/buffer.ts 30.81% <0.00%> (-4.07%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@erha19 erha19 changed the title feat: workspace dir async watch feat: improve workspaceService initialize speed Oct 25, 2022
@github-actions github-actions bot added the 🎨 feature feature required label Oct 25, 2022
@erha19 erha19 merged commit 2929f97 into main Oct 25, 2022
@erha19 erha19 deleted the feat/optimize-async-workspace-watch branch October 25, 2022 02:26
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

2 participants