-
-
Notifications
You must be signed in to change notification settings - Fork 513
Implement proper indexing and caching mechanisms #1677
Description
Issue Checklist
- I confirm that this feature request has not been previously suggested.
- I agree to follow the project's code of conduct.
- I have checked and verified that I am using the latest version of AndroidIDE from GitHub or F-Droid.
Additional terms
- I understand that feature requests are subject to evaluation and may not be implemented immediately.
- I agree to provide additional details if needed for a clearer understanding of the requested feature.
Feature description
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.