Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkifier causes window to hang on long lines #28921

Closed
ray-kast opened this issue Jun 17, 2017 · 1 comment
Closed

Linkifier causes window to hang on long lines #28921

ray-kast opened this issue Jun 17, 2017 · 1 comment
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@ray-kast
Copy link

  • VSCode Version: Code 1.13.1 (379d2ef, 2017-06-14T18:18:03.540Z)
  • OS Version: Linux x64 4.4.0-79-generic (Elementary OS 0.2 Loki/Ubuntu 16.04)
  • Extensions: <bug appears with --disable-extensions>

So, I ran the command pictured below, which was supposed to print a whole bunch of lines, but because I'm an idiot it printed all the items on one line with a whole lot of literal '\n's between them:

image

However, printing said lines caused VS Code to completely lock up, and I had to kill it. After some testing, I discovered the following in the CPU profiler:

image

These are the results after running the profiler for about 10 seconds while VS Code was frozen. The first line reveals something interesting:

image

It appears that Linkifier is using a backtracking regular expression to detect links on a single line of the terminal, which, for a line as long as the one I printed, causes the entire window to freeze for several minutes.

@Tyriar
Copy link
Member

Tyriar commented Jun 17, 2017

Duplicate #24795

@Tyriar Tyriar closed this as completed Jun 17, 2017
@Tyriar Tyriar added the *duplicate Issue identified as a duplicate of another issue(s) label Jun 17, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants