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

investigate bun #60

Closed
DetachHead opened this issue Jan 26, 2024 · 5 comments
Closed

investigate bun #60

DetachHead opened this issue Jan 26, 2024 · 5 comments
Labels
node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package)

Comments

@DetachHead
Copy link
Owner

it might make pyright faster

@DetachHead DetachHead added the node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package) label Mar 20, 2024
@znd4
Copy link

znd4 commented Apr 7, 2024

Barely on-topic, but would it be easy to allow "bring your own pyright / node / bun"? If so, it'd probably be pretty easy to implement a solution for #177, although it'd require a bit of maintenance to keep the pyright version correct.

I'll try digging into the code to see if there's a light-touch way to implement this.

@KotlinIsland
Copy link
Collaborator

It wouldn't be possible to bring your own pyright, this project is setup such that it modifies a lot of source, not just acts as an 'expansion pack'.

@DetachHead
Copy link
Owner Author

i might add an option to byo node, which would hopefully fix these issues: #177 #172 #167

when i first started this project, i just wanted it to be a vscode extension where users could specify any version of pyright (the only issue i was trying to fix at the time was the ability to pin the version used by vscode), but i literally couldn't get the language server to work without modifying how the pyright language server is built (c1c8be9) so i gave up on that approach. i think even if we can get it working, it's not something worth supporting. basedpyright's additional functionality can be disabled to have essentially a backwards-compatible version of pyright, which i think covers that use case.

@jfcherng
Copy link
Contributor

jfcherng commented Apr 8, 2024

Just want to share my test on a Win11 x64 PC with the recent Bun v1.1.0, which is the first release supporting Windows.

I don't "feel" (no numerical statistics, just my feeling) it's obviously faster, but it consumes much more memory than electron/node. I use bun/electron/node to run Pylance on the same Python project.
image


Just an FYI, you can use Electron to run as node by setting env variable ELECTRON_RUN_AS_NODE=1 and it consume less memory (and CPU?) due to its optimizations. This is what I do for all node.js-based LSP servers on my local setup in Sublime Text.

@DetachHead
Copy link
Owner Author

yeah don't think there's any benefit to doing this atm. can re-open this issue in the future if that changes. see #202 (comment)

@DetachHead DetachHead closed this as not planned Won't fix, can't repro, duplicate, stale Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node issues relating to the fact that basedpyright depends on nodejs (the nodejs-wheel pypi package)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants