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.
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 :
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.