vscode-markdown icon indicating copy to clipboard operation
vscode-markdown copied to clipboard

Extension stops working when there are >10000 image files in a workspace

Open yy0931 opened this issue 3 years ago • 2 comments

Problem

The enter and backspace keys become unresponsive if there are many images in the workspace. Could you make it interrupt the autocompletion when there are many completion items?

How to reproduce

  1. Open a folder
  2. Run the following Python script to make dummy files test.py
    from pathlib import Path
    
    Path("foo/bar").mkdir(exist_ok=True, parents=True)
    for i in range(50000):
        Path(f"foo/bar/file{i}.png").write_text("")
    
  3. Make a markdown file and type ![](./ test.md
    ![](./
    
  4. The enter and backspace keys will be unresponsive.

Environment

  • Markdown All in One v3.4.0
  • VSCode 1.62.2

yy0931 avatar Nov 19 '21 21:11 yy0931

>10000 images

That is a bit crazy 😅

We haven't considered this case. But you may use (workspace level) search.exclude to ignore certain folders.

yzhang-gh avatar Nov 20 '21 01:11 yzhang-gh

This is actually not that absurd. If you use vscode as Markdown editor in a way similar to the use case of obsidian you can encounter this problem in daily work (i got 10k png's, 60k jpg's, 3.5k md's). I hope this gets looked into at some point.

ludos1978 avatar Jan 04 '24 10:01 ludos1978