I’m wondering if anyone has found a good way to profile Kakoune’s startup time. I’ve been using time kak -e "exec 'gj:q<ret>'" ~/some/file for a general metric, but that’s not very useful for figuring out which kak scripts are slow.
Ideally, what I’d like is something like the vim --startuptime option, that would record the time it takes to source each kak file, and put it into a file or the scratch buffer.
Hmm, I has hoping for something a little more built-in than that. Maybe it sounds more complicated than it is. Could you give me an example?
I found on github, that you can set set global debug profile. When I tried it, it worked and gave some good results in the debug buffer, but didn’t stop printing and Kakoune crashed.
Do you know if there’s any documentation on these debugging features?
I wasn’t using this because it was providing too much info in my case.
My usage was a bit ugly, I’ve used time command with nanoseconds, and saved the start time, and end time, then calculated the difference. I understand that this isn’t the most accurate way to measure, but for my needs it provided sane results and I was able to track major speedups while optimizing the code.