Open aartaka opened 1 year ago
So there are at least 2 performance issues at play here: initialization and view computation.
For the first one, the bottleneck is ensure-suggestions-list
which is called in initialize-instance :after
of source
:
(setf (slot-value source 'initial-suggestions)
(ensure-suggestions-list source (initial-suggestions source)))
Multiple strategies:
suggestion
objects lazily.ensure-suggestions-list
and make-suggestion
into regular functions to avoid the dispatch cost.if
in ensure-suggestions-list
by writing code in a way we know which type of object we are dealing with.Yeah, maybe adding a toplevel (declaim (optimize speed))
won't hurt
I've got this code in my Nyxt config:
When running the command, I usualy wait some 3-7 seconds for it to load, and the scrolling/narrowing is terribly laggy. Would be nice to optimize something on the Prompter side to make it work :)