Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Extension seems to make too many simultaneous requests to Flow server, cratering performanceΒ #414

@jedwards1211

Description

@jedwards1211

I've been using the extension in LSP, non-lazy mode with Flow 0.131.0, and when I'm jumping between files and saving changes multiple times before the Flow server finishes rechecking, I see the following symptoms:

  • Flow status in the status bar rapidly flickers between "starting up" and "finishing up" for several seconds
  • Sometimes in the problems panel I see identifier names appearing one character at a time, as if they're being typed out slowly. And in an editor I can also see the error underline gradually extending under an identifier one character at a time.

Does this extension throttle requests to the server at all?

I forked and cleaned up the vscode-flow-ide extension before switching back to flow-for-vscode, since it supports LSP and lazy mode. One of the things I did in vscode-flow-ide to fix performance problems was throttle requests to the server so that only one was in flight at a time. That probably isn't ideal since jump to definition, hover inspection, etc. are all blocked while the server is rechecking, but it does seem to finish rechecking faster. I get the impression that this extension is making too many simultaneous requests to the server while it's rechecking, bogging it down severely.

I tried my fork of vscode-flow-ide again and I can definitely attest that rechecking finishes up faster than with flow-for-vscode. Maybe at some point I should just dig through the code here looking for improvements I could make...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions