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

Improving server performance #543

Merged
merged 11 commits into from
Mar 13, 2023
Merged

Improving server performance #543

merged 11 commits into from
Mar 13, 2023

Conversation

Justinidlerz
Copy link
Contributor

No description provided.

@@ -607,11 +603,6 @@ esbuild:
DevMode: task.DevMode,
}
subTask.treeShaking = newStringSet()
_, err = subTask.build(tracing)
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep this, build sub-modules from scratch is slow even you keep the lock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it will block the response, I think we can pre-build sub-modules while the main module build done.

Copy link
Member

Choose a reason for hiding this comment

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

are you sure the final import time is optimized if build sub-modules from request? if yes, try to increase the timeout

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems the timeout problem may be due to locks, the tfjs pkg will show the problem, debugging

@Justinidlerz
Copy link
Contributor Author

@ije I fixed the import problems. All tests will spend 383047ms about 6.3m, and the before this PR will spend 452540ms about 7.5m. Totally reduced 1m time spent least. And the performance will show more at new package installation.
image
image

@Justinidlerz Justinidlerz requested a review from ije March 13, 2023 10:31
Copy link
Member

@ije ije left a comment

Choose a reason for hiding this comment

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

can you please remove the buildConcurrency of config then check the test time again?

@ije
Copy link
Member

ije commented Mar 13, 2023

@ije I fixed the import problems. All tests will spend 383047ms about 6.3m, and the before this PR will spend 452540ms about 7.5m. Totally reduced 1m time spent least. And the performance will show more at new package installation. image image

looks great!

@Justinidlerz
Copy link
Contributor Author

Justinidlerz commented Mar 13, 2023

image
@ije The time spent of removed buildConcurrency is 390984ms, By the way, I think the performance improvement will be more obvious when concurrent requests or Importing the same submodules of a package.

@Justinidlerz Justinidlerz requested a review from ije March 13, 2023 11:12
Copy link
Member

@ije ije left a comment

Choose a reason for hiding this comment

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

LGTM, great job!

@ije ije merged commit 1d3ac2a into esm-dev:main Mar 13, 2023
@ije ije mentioned this pull request Mar 24, 2023
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.

2 participants