AndroidIDE icon indicating copy to clipboard operation
AndroidIDE copied to clipboard

[Bug]: Improve getIndentAdvance() in tree sitter lang to reduce lag

Open itsaky opened this issue 2 years ago • 0 comments

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

itsaky avatar Oct 04 '23 14:10 itsaky