Skip to content

Improve performance of clojure-ts-align#145

Open
rrudakov wants to merge 1 commit into
clojure-emacs:mainfrom
rrudakov:feat/speedup-align-forms
Open

Improve performance of clojure-ts-align#145
rrudakov wants to merge 1 commit into
clojure-emacs:mainfrom
rrudakov:feat/speedup-align-forms

Conversation

@rrudakov

Copy link
Copy Markdown
Contributor

Cache semantic indentation rules for a single clojure-ts-align run to avoid lookup for every repeating symbol.

Context: I noticed that clojure-ts-align can be quite slow when aligning very large expressions (i.e. large EDN system configurations or large integration test functions). clojure-ts-mode performs lookup for an indentation rule for every symbol, with CIDER connected it also involves nREPL communication.

I've been using this improved version for a very long time and haven't noticed any downsides.


Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):

  • The commits are consistent with our contribution guidelines.
  • You've added tests (if possible) to cover your change(s). Bugfix, indentation, and font-lock tests are extremely important!
  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

Cache semantic indentation rules for a single clojure-ts-align run to avoid
lookup for every repeating symbol.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant