-
Notifications
You must be signed in to change notification settings - Fork 281
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
Fix/jest scenarios #219
Fix/jest scenarios #219
Conversation
Previously removing this would prevent source maps getting resolved at runtime at all.
I noticed in profiles that this was actually a bottleneck for Jest tests (in #214) when running as a cluster. I wanted to use a worker thread for it, but it looks like there's an issue in vscode preventing that[1] for the moment. This cuts the time-to-first-breakpoint in half for the jest tests, which is fairly nice. The child process is killed after 30 seconds of inactivity. I may do an algorithmic optimization pass on the hash in the future. In particular, Node/V8 now has native bigint support, which is almost certainly faster than the `long` library. 1. microsoft/vscode#88386
|
||
const send = (req: HashRequest): Promise<string | undefined> => { | ||
const cp = create(); | ||
cleanup(); |
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.
Does this call just start the 30s timer for the cleanup callback? It's not totally clear from the name alone.
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.
Yep, debouce
will call the wrapped function 30 seconds after the last call to it. More explanation on debouncing
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.
Got it. I'm familiar with debouncing, it just wasn't clear that calling cleanup()
wasn't actually executing the cleanup method, but rather starting the debounce timer for the cleanup method.
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.
Ah, gotcha, I'll clarify that variable name on master
!
8e7cdc3
to
85f2154
Compare
fix: preserve source map handler even without pauses
Previously removing this would prevent source maps getting resolved at runtime at all.
fix: disable instrumentation bp in node by default
It looks like in Jest the instrumentation BP is set, but because everything is on disk and we have the manually added entrypoint breakpoints, this is not needed.
feat: move content hashing to a child process
I noticed in profiles that this was actually a bottleneck for Jest tests
(in Should it debug typescript files ? #214) when running as a cluster. I wanted to use a worker thread
for it, but it looks like there's an issue in vscode preventing that[1]
for the moment.
This cuts the time-to-first-breakpoint in half for the jest tests, which
is fairly nice. The child process is killed after 30 seconds of
inactivity. I may do an algorithmic optimization pass on the hash in
the future. In particular, Node/V8 now has native bigint support, which
is almost certainly faster than the
long
library.Fixes #214