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

perf:skip modules patch module graph by self #826

Merged
merged 9 commits into from
Jan 2, 2024

Conversation

stormslowly
Copy link
Member

@stormslowly stormslowly commented Dec 26, 2023

close #824

  1. skip Module 优化话,修改 ast 后,根据依赖替换的信息,修改 module graph 中模块和模块之间的edge
  2. 由于 Dependence 需要唯一 key,所以使用对应的 specifier 的 span 作为 Dep 的 span。
  3. 新增 多个语句使用相同 source 的替换 的用例,一个 source 对应的语句删除,一个 source 对应的保留

perf with-antd

skipModules on : 433ms.
skipModules off: 340ms.

master branch ; P
3491ms.

@stormslowly stormslowly changed the title wip: Perf:skip modules patch module graph by self perf:skip modules patch module graph by self Dec 27, 2023
@sorrycc sorrycc merged commit 1e3fd01 into master Jan 2, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the perf/skip_modules_do_lots_resolve branch January 2, 2024 03:29
@afc163
Copy link
Contributor

afc163 commented Jan 2, 2024

为啥开了 skipModules 性能还变低了

@stormslowly
Copy link
Member Author

因为需要优化做的事情更多了;这个 skip modules 是在 module graph 创建完以后做的。

@stormslowly stormslowly restored the perf/skip_modules_do_lots_resolve branch March 25, 2024 05:24
@stormslowly stormslowly deleted the perf/skip_modules_do_lots_resolve branch August 9, 2024 06:13
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.

tree-shaking performance deterioration due to skipModules
3 participants