Skip to content

Risk for bad performance #3

@jrieken

Description

@jrieken

We have identified[1] this extension as being a possible cause for high load on the extension host. I'd suggest to optimise this part of the provideCompletionItems-function. With very large documents there is potential for bad perf because the whole document is first scanned for /**...*/-blocks (until one includes the cursor-position). Instead I'd advise to take the current cursor position and from there walk left until you see /** and walk right until you see */.

[1] How do we know? The extension host must send a ping every 250ms to the main thread. If that doesn't happen 4 times in a row we send a telemetry event containing the ids of all active extensions. Those lists of ids we analyse to find extensions that occur over and over again.

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