davidhalter/jedi — pull request #363 by davidhalter (2014-01-10 15:06:47+00:00)
Title: Fixing Memory Issues in Compiled Modules

Add a `compiled` module to process compiled (c modules) faster. This should improve performance (especially memory) significantly.

We achieve this by working directly with compiled objects (namely`dir()` and `__doc__` to achieve the same feature set. Previously Jedi used the `evaluate.builtin` module to do autocompletion, which meant creating Python code from compiled modules, parsing it and then letting it run through the evaluation process. As you can imagine this takes quite a lot of time and memory compared to an `import` and a few lazy `dir` and `__doc__` checks.

Side effects:
- Compiled modules are now imported every time. There's no cache layer anymore, because there's no parser anymore.
- An IMHO cleaner way to do this.
- Removing `interpret.py` and `builtin.py`, two different versions of modules that created an AST for compiled modules.
- It's going to be easier to correctly evaluate `list[1 + 1]` (although not part of this pull request).

Hopefully fixes #102, #335