-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add esbuild cache #101
base: master
Are you sure you want to change the base?
Add esbuild cache #101
Conversation
@@ -152,17 +154,19 @@ export class EsbuildPlugin implements Plugin { | |||
async watch(): Promise<void> { | |||
const options = { | |||
ignored: this.buildOptions.watch.ignore, | |||
awaitWriteFinish: true, | |||
awaitWriteFinish: { | |||
stabilityThreshold: 50, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this it there because before it would wait 2000 ms just until it would start compiling changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds reasonable when taking into account the size of a typical code file. But if half saved code gets compiled we'll have to higher this value a little bit (I think a couple of hundreds should still give a smooth experience but prevent any weirdness)
Sounds good to me, however one question, shouldn't we |
@olup I had the same question in mind. |
@thomaschaaf I investigated on how to limit memory usage, but that's on esbuild and not possible as far as I can tell. However I just submitted a PR to limit the number of lambdas that are concurrently build, so you can keep memory consumption at reasonable levels while still building amazingly fast, here is the PR in case it is helpful: This PR and mine would probably conflict, happy to take a look when this gets merged to update mine @floydspace |
This improves build times for larger projects. Sadly it does not improve the memory usage as anticipated.