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

Feat/worker thread #1003

Open
wants to merge 6 commits into
base: preview
Choose a base branch
from

Conversation

Iamshankhadeep
Copy link
Contributor

fixes #856

Copy link

netlify bot commented Mar 20, 2024

Deploy Preview for continuedev canceled.

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

@Iamshankhadeep Iamshankhadeep changed the base branch from main to preview March 22, 2024 05:22
@sestinj
Copy link
Contributor

sestinj commented Mar 23, 2024

@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

@Iamshankhadeep
Copy link
Contributor Author

@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

@sestinj
Copy link
Contributor

sestinj commented Apr 1, 2024

@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

@Iamshankhadeep
Copy link
Contributor Author

@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 🔥

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.

100% CPU Usage
2 participants