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: spawn runtime task ASAP #276

Merged
merged 1 commit into from
Nov 15, 2023
Merged

Conversation

hyf0
Copy link
Member

@hyf0 hyf0 commented Nov 15, 2023

Description

Test Plan


Arc::clone(&self.resolver),
);

module_loader.try_spawn_runtime_module_task();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

being called twice, not sure if intentional

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. It's designed to be abled called multiple times. The first call is to trigger the task and second is to get the runtime ModuleId.

https://github.com/rolldown-rs/rolldown/blob/c93a2fb3725a0ebf6f792aa9191a366ceae4fcb9/crates/rolldown/src/bundler/module_loader/module_loader.rs#L95-L106

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But calling twice is not a good sign, I have ideas to solve it, but just too many todos on the schedules.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, makes sense!

@hyf0
Copy link
Member Author

hyf0 commented Nov 15, 2023

Merge activity

  • Nov 15, 1:19 AM: @hyf0 started a stack merge that includes this pull request via Graphite.
  • Nov 15, 1:19 AM: Graphite rebased this pull request as part of a merge.
  • Nov 15, 1:20 AM: @hyf0 merged this pull request with Graphite.

Base automatically changed from 11-15-refactor_RuntimeNormalModuleTask_don_t_rely_on_ModuleTaskCommonData_anymore to main November 15, 2023 06:19
@hyf0 hyf0 force-pushed the 11-15-perf_spawn_runtime_task_ASAP branch from fdda345 to 1c588b2 Compare November 15, 2023 06:19
@hyf0 hyf0 merged commit ba7f558 into main Nov 15, 2023
@hyf0 hyf0 deleted the 11-15-perf_spawn_runtime_task_ASAP branch November 15, 2023 06:20
hyf0 added a commit that referenced this pull request Nov 15, 2023
<!-- Thank you for contributing! -->

### Description

This also reduce the calling times of `try_spawn_runtime_module_task`. #276 (comment)

<!-- Please insert your description here and provide especially info about the "what" this PR is solving -->

### Test Plan

<!-- e.g. is there anything you'd like reviewers to focus on? -->

---
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.

3 participants