AndroidIDE
AndroidIDE copied to clipboard
[Bug]: Improve getIndentAdvance() in tree sitter lang to reduce lag
What happened?
When working with large files, if the editor receives an 'enter' key event, it leads to the call of TreeSitterLanguage.getIndentAdvance(). In this method, the language implementation parses the whole source code in order to compute the indent which results in a lag (about 1 second for 35K+ lines).
What's the expected behavior?
The indent should be computed as quick as possible.
What version of AndroidIDE you're using?
v2.5.3 (debug builds)
Relevant log output
No response
Duplicate issues
- [X] This issue has not been reported yet.
Code of Conduct
- [X] I agree to follow this project's Code of Conduct