Skip to content

needs_script is slow sometimes (in MacVim?) #105

@comex

Description

@comex

After upgrading LustyJuggler from an old vim.org version, I noticed that there was a notable lag between pressing the key to run :LustyJuggler and the menu actually appearing, but only in MacVim - on the command line it was fast. Long story short:

  • Stubbing out needs_script? fixed the lag (regardless of the return value).
  • The lag doesn't come from time spent actually running the script - profiling showed that it always exited promptly.
  • Instruments suggests that the time is spent redrawing (even though the output is supposedly being redirected). Since needs_script? is executed 7 times for each key mapping, it would make sense for the lag caused by this to be noticeable.
  • This may or may not be related, but if the call to print_buffer_list is commented out, I get a list of bindings for some reason. I didn't figure out which command is causing that, but it seems odd.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions