Skip to content

Populate PRELOADED_MODULES lazily #310

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

Conversation

nanoant
Copy link

@nanoant nanoant commented Mar 26, 2018

Prevents wasting CPU/IO cycles when PRELOADED_MODULES are not going to be
used anyway, e.g. Rope is missing or disabled.

This is follow-up for #286 and #301

@palantirtech
Copy link
Member

Thanks for your interest in palantir/python-language-server, @nanoant! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

@nanoant nanoant force-pushed the patch/populate-preloaded-modules-lazily branch from 47d6560 to 241950a Compare March 26, 2018 16:55
@nanoant nanoant changed the title Populate Workspace.PRELOADED_MODULES lazily Populate PRELOADED_MODULES lazily Mar 26, 2018
@nanoant nanoant closed this Mar 26, 2018
@nanoant nanoant reopened this Mar 27, 2018
@palantirtech
Copy link
Member

Thanks for your interest in palantir/python-language-server, @nanoant! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request.

Otherwise we spend time populating PRELOADED_MODULES regardless if we
use Rope or not.
@nanoant nanoant force-pushed the patch/populate-preloaded-modules-lazily branch from 241950a to fdc261d Compare March 27, 2018 10:44
@gatesn
Copy link
Contributor

gatesn commented Jun 29, 2018

Closing this since you can now disable / configure preloaded module: https://github.com/palantir/python-language-server/blob/develop/pyls/plugins/preload_imports.py

@gatesn gatesn closed this Jun 29, 2018
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.

3 participants