Tuesday, June 3, 2025

Re: Profiling Vim9 scripts

On 2025-06-03, Lifepillar <lifepillar@lifepillar.me> wrote:
> On 2025-05-03, Lifepillar <lifepillar@lifepillar.me> wrote:
>> What is the status of profiling for Vim9 scripts?
>>
>> I'm trying to profile a somewhat complex script using
>>
>> profile start test.prof
>> profile func *
>>
>> and getting:
>>
>> E1271: Compiling closure without context: <lambda>65
>
> Follow-up: skipping `profile func *` appears to work.

Mmh, not that's incorrect. This is how I actually make it work:

1. profile start test.prof
2. profile func *
3. Execute whatever Vim9 script. At this point, I get E1271.
4. Source the offending script (the one defining <lambda>65).
5. Re-execute whatever Vim9 script.
6. profile stop.

Step (4) is what fixes E1271.

The total times are bonkers ("functions sorted on total time" and
"functions sorted on self time"), but the profile of each individual
function looks reasonable enough.

Life.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/101mjpg%24ba8%241%40ciao.gmane.io.

No comments: