microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.94k stars 28.77k forks source link

link parsing should favor on screen urls over offscreen content for huge files #122265

Open jsoref opened 3 years ago

jsoref commented 3 years ago

Issue Type: Bug

  1. git clone https://github.com/tobie/specref
  2. Open the repository in VSC
  3. open refs/wg21.json
  4. use find to jump to a line, e.g. for swappability (on line 121544)
  5. try to command click the link on the next line

actual results: it takes a really long time before the link is clickable

presumption: I'm guessing that the syntax highlighter is trying to parse and highlight all of the lines leading up to the current line.

expected results: if the file is large (>10k lines?), skip trying to parse the entire file, and instead try to parse a window around the displayed portion first and then in the background parse the rest of the file.

VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:36:32.643Z) OS version: Darwin x64 19.6.0

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz (8 x 2500)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 3, 3| |Memory (System)|16.00GB (0.08GB free)| |Process Argv|-psn_0_319566 --crash-reporter-id 1fc67ee2-0174-4598-9f98-4537df0dd32c| |Screen Reader|no| |VM|0%|
Extensions (32) Extension|Author (truncated)|Version ---|---|--- open-in-macdown|Cod|1.0.0 vscode-zonefile|Com|0.0.4 vscode-markdownlint|Dav|0.40.4 vscode-eslint|dba|2.1.20 EditorConfig|Edi|0.16.4 prettier-vscode|esb|6.3.2 go|gol|0.24.2 hive-sql|jos|0.0.4 vscode-sbt-scala|lig|0.2.4 hg|mrc|1.7.1 vscode-docker|ms-|1.12.1 vscode-kubernetes-tools|ms-|1.3.0 vscode-postgresql|ms-|0.3.0 python|ms-|2021.4.765268190 jupyter|ms-|2021.5.745244803 cpptools|ms-|1.3.1 vscode-typescript-tslint-plugin|ms-|1.3.3 fabric8-analytics|red|0.3.2 java|red|0.77.0 vscode-commons|red|0.0.6 vscode-xml|red|0.16.0 vscode-yaml|red|0.18.0 preview-vscode|sea|2.2.5 html-preview-vscode|tht|0.2.5 simple-rst|tro|1.0.1 vscodeintellicode|Vis|1.2.12 vscode-java-debug|vsc|0.32.1 vscode-java-dependency|vsc|0.18.3 vscode-java-pack|vsc|0.14.0 vscode-java-test|vsc|0.28.1 vscode-maven|vsc|0.29.0 markdown-all-in-one|yzh|3.4.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vstry244:30276681 pythonvsnew554cf:30291488 pythontb:30283811 vspre833:30267464 pythonptprofiler:30281270 vshan820:30276952 pythondataviewer:30285071 vscus158:30286553 vscgsv2ct:30294353 ```
jsoref commented 3 years ago

Note the file is open, and I'm jumping through it and after each jump it still takes a long time for links to be underlined.