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

Implement proper indexing and caching mechanisms #1677

Open
5 tasks done
itsaky opened this issue Jan 24, 2024 · 0 comments
Open
5 tasks done

Implement proper indexing and caching mechanisms #1677

itsaky opened this issue Jan 24, 2024 · 0 comments
Assignees
Labels
feature Feature Request

Comments

@itsaky
Copy link
Member

itsaky commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant