Skip to content

Implement proper indexing and caching mechanisms #1435

Description

@Wadamzmail

The IDE should have a proper indexing and caching mechanisms to index/cache symbols in libraries and projects. It could be similar to how to Android Studio and Intellij IDEA index the symbols, but we still need to do more research on this and come up with something appropriate for the Android Runtime (considering Android devices are a lot less powerful than the desktop/laptop systems).

We need to consider the following aspects while designing (or looking for) the indexing mechanism :

  • Performance - index R/W speed
  • Memory requirements
  • Incremental updates
  • Searching - efficient algorithms for faster searches

Resources:

Use Case

The best use case for indexing symbols is to provide faster completions and other language features in LSP implementations. For example, the Java compiler could be modified to resolve symbols from such indices instead of reading class files directly. Such symbols can be indexed once and then used later (i.e. shared between projects), instead of reading the class files every time a project is opened in the editor activity.

Benefits

If properly implemented, it could make the LSP implementations faster and more efficient as compared to the current implementations. With proper caching mechanisms, it could also prove to be memory efficient in some cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions