cider-nrepl icon indicating copy to clipboard operation
cider-nrepl copied to clipboard

Avoid a few compile-time computations?

Open vemv opened this issue 2 years ago • 1 comments

Expected behavior

CIDER starts up as fast as possible, particularly in face of large projects/classpaths.

Actual behavior

Some computations are performed at compile time:

  • https://github.com/clojure-emacs/cider-nrepl/blob/6d3934eb665574af891e81ef5c11cf9c2b4e1d65/src/cider/nrepl/middleware/stacktrace.clj#L125

  • https://github.com/clojure-emacs/cider-nrepl/blob/6d3934eb665574af891e81ef5c11cf9c2b4e1d65/src/cider/nrepl/middleware/track_state.clj#L152

Proposal

Wrapping those under a delay as other parts of the codebase do. Might be considered a breaking change though.

cider-nrepl version

master

vemv avatar Aug 09 '21 23:08 vemv

I thinking delaying those shouldn't be an issue. I have to admit I rarely think about such micro-optimizations, as I hope most people don't get to start/restart CIDER/Calva/whatever often. :-)

bbatsov avatar Aug 10 '21 08:08 bbatsov