continue icon indicating copy to clipboard operation
continue copied to clipboard

Feat/worker thread

Open Iamshankhadeep opened this issue 1 year ago • 5 comments

fixes #856

Iamshankhadeep avatar Mar 20 '24 22:03 Iamshankhadeep

Deploy Preview for continuedev canceled.

Name Link
Latest commit 2105cea7bde4e116ec3c568091dd8b6040dcb3f0
Latest deploy log https://app.netlify.com/sites/continuedev/deploys/65fb651b8523ae00086473e6

netlify[bot] avatar Mar 20 '24 22:03 netlify[bot]

@Iamshankhadeep I finally got around to testing this locally. Everything looks perfect, including the packaging with esbuild (you solved this very cleanly!). But it seems that VS Code isn't doing well with worker threads. In debugging mode, the worker never responds (can verify this by placing a breakpoint in the on message function).

Then when I packaged the extension and installed it as a .vsix, everything seemed to work fine, until using the @ codebase context provider causes the extension host to crash.

Had you seen the same issue or have any ideas? https://github.com/microsoft/vscode/issues/88386 seems like the most closely related issue, though seemed to have been solved

sestinj avatar Mar 23 '24 21:03 sestinj

@Iamshankhadeep I finally got around to testing this locally. Everything looks perfect, including the packaging with esbuild (you solved this very cleanly!). But it seems that VS Code isn't doing well with worker threads. In debugging mode, the worker never responds (can verify this by placing a breakpoint in the on message function).

Then when I packaged the extension and installed it as a .vsix, everything seemed to work fine, until using the @ codebase context provider causes the extension host to crash.

Had you seen the same issue or have any ideas? microsoft/vscode#88386 seems like the most closely related issue, though seemed to have been solved

I was having the same issue while testing on this worker_thread but terminating the worker thread worker.terminate(); seems to fix that.

until using the @ codebase context provider causes the extension host to crash.

I can think of one issue probably using @ codebase opening too many worker threads before terminating previous theard crasing, or probably adding some smart resourse limit

Iamshankhadeep avatar Mar 24 '24 19:03 Iamshankhadeep

@Iamshankhadeep the worker limit is a good idea. When you had the same problem, was it in debug mode, or was this with a packaged version of the extension? I would be curious whether you end up seeing the same problem that I did after running cd extensions/vscode && node scripts/package.js and then installing build/continue-patch.vsix

sestinj avatar Apr 01 '24 18:04 sestinj

@Iamshankhadeep the worker limit is a good idea. When you had the same problem, was it in debug mode, or was this with a packaged version of the extension? I would be curious whether you end up seeing the same problem that I did after running cd extensions/vscode && node scripts/package.js and then installing build/continue-patch.vsix

let me try that and I'll let you know 🔥

Iamshankhadeep avatar Apr 04 '24 06:04 Iamshankhadeep