opensumi / core

🚀 A framework helps you quickly build AI Native IDE products. https://preview.opensumi.com
https://opensumi.com
MIT License
2.89k stars 372 forks source link

fix: file service will watch same folder multiple times #3813

Closed bytemain closed 3 months ago

bytemain commented 3 months ago

Types

Background or solution

之前的逻辑有判断要 watch 的路径是否已经被 watch 了,但是因为 async await 的原因,前端同时请求过来三四个一样的路径,后端会同时 watch 这些路径。

同时也优化了一些性能问题,原来的代码里检测文件夹是否存在时使用了 Sync 方法,这会导致处理文件监听时 Node 层会同步卡住进行的。

Changelog

fix file service will watch same folder multiple times

railway-app[bot] commented 3 months ago

🚅 Previously deployed to Railway in the core project. Environment has been deleted.

bytemain commented 3 months ago

提到 3.1