mrcrowl / vscode-hg

Integrated Mercurial source control for Visual Studio Code
MIT License
71 stars 37 forks source link

100% CPU usage when navigating through a file with line annotations enabled #190

Open Tadas opened 2 years ago

Tadas commented 2 years ago

Navigating a file by holding down or up arrows causes CPU usage to spike to 100%. When I let go of the key line annotations for skipped lines start appearing in random order. After it settles down, the annotation left showing is not for the line the cursor is on.

Shouldn't this debounce period be longer than 0? Bumping it up to 100 or so seems to have fixed it. https://github.com/mrcrowl/vscode-hg/blob/8661ee183e6d2aea9f6c8a53f5171c86644d50ea/src/annotations.ts#L152-L155