I observe a dramatic typing lag increase and gener...
# kotest
d
I observe a dramatic typing lag increase and general IDE unresponsiveness when editing a certain koTest file. It contains a ShouldSpec and is about 1000 lines long (oh, actually exactly 1000, heh). I recall that several years ago there was a similar issue with the
Spec
test framework and it was related to the fact that there is a big lambda, wrapping everything here:
Copy code
class MyTest : ShouldSpec(<big_lambda>)
I'm here to ask if anyone can provide me with the YouTrack link or something which I could track and report further findings — I suspect this is a known issue. P.S. In Spec-days it seemed to get improved, but maybe not enough...
e
Is the typing-lag still there if you disable the Kotest plugin?
d
I guess I'l have to also restart? Actually it maybe not exactly typing lag, although it does happen often, but certainly a) syntax highlight lag — after I copy-paste something, code/errors get highlighted after about 5 seconds which is ridiculous b) I constantly see "Resolving pasted code imports" in the status line, which normally happens instantly.
e
I think so. I'm asking because I remember seeing such a report but where JB said that the Kotest plugin was the culprit.
Is the Spec publicly available?
w
I recall one related issue that was primarily caused by passing the test lambda directly to the constructor. Using an
init
block instead resolved the issue, maybe it'll help for you too?
d
Yep, Spek (I mistyped) is here.
Using an
init
block instead
Oh right! I recall this was earlier solution too. I'll try it!
a
Wow, switching to
init
made a huge difference, thanks! Our 3kLOC spec is actually editable now.
d
I wish these issues wouldn't exist at all in our modern age with modern hardware 🥲 3kLOC really should be nothing to my beast of processor 🙂
Even if I change to init style and then edit the same file in Emacs — it feels sooo snappy (and syntax HL is enabled too of course). But only basic completion. Still I think it shouldn't be that much of an influence...