Skip to content

Perf issue: scrolling in the completion menu keeps triggering (re)parsing of the command line over and over #885

@blindFS

Description

@blindFS

Platform macOS
Terminal software ghostty

Found this issue during nushell/nushell#15270

Steps to reproduce

  1. type in use std <tab>
  2. hold ctrl-p/ctrl-n down for a while

rustc optimized nu release performs noticeably better.

Basically the menu next/prev event will trigger the parsing of the cli, which involves dozens of parse_module_file calls.

I guess it has something to do with the highlighting. But since the cli text doesn't change by those events (maybe I missed some config here to make it happen), I think it should be optimized.

Typing in cli after use std is also not very responsive due to the same reason, but that is probably harder to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CompletionsArea: Tab completion and inline hint completionsA-PerformanceArea: Speed and resource footprint of reedline to guarantee a pleasant smooth experienceP-lowLow Priority: Implementation would be nice to have but does not severely impact quality of lifebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions