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

Create a Database Index for Jedi #1059

Open
davidhalter opened this issue Mar 12, 2018 · 3 comments
Labels

Comments

@davidhalter
Copy link
Owner

@davidhalter davidhalter commented Mar 12, 2018

For a lot of things (especially usages) jedi's completely lazy approach is not good enough. It is probably better to use a database index cache. The index will basically be a graph that saves all the type inference findings.

This is just an issue for discussion and collection of possible ideas.

@hajs

This comment has been minimized.

Copy link

@hajs hajs commented Mar 21, 2018

Recently I wrote my own source indexer using jedi.
I used a sqlite databases with four tables: file, name, definition and reference.
Indexing stdlib took about four minutes using multiprocessing on four cores,

It would be great if the index could be exposed to the public api in some way.
Besides finding all usages of a definition, a database could be used to offer auto imports and fast fuzzy auto-complete.

@davidhalter

This comment has been minimized.

Copy link
Owner Author

@davidhalter davidhalter commented Mar 21, 2018

That's actually pretty fast. Did you index all the subfolders (asyncio, multiprocessing, json, etc)?

Also can you post the script? I wonder if it's "complete".

@davidhalter

This comment has been minimized.

Copy link
Owner Author

@davidhalter davidhalter commented Dec 23, 2018

@hajs I would still be interested :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.