foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.44k stars 662 forks source link

Search in large workspace very slow with Foam enabled #965

Open cale-at-reify opened 2 years ago

cale-at-reify commented 2 years ago

Describe the bug

I have a foam folder as one project in a multi-project workspace. When I have the Foam extension enabled, global search slows down significantly, even with "Use Exclude files and Ignore Settings" enabled.

Without the extension enabled, the same search comes back in seconds.

Small Reproducible Example

No response

Steps to Reproduce the Bug or Issue

  1. Create workspace with many sub-projects (using "Add folder to workspace...")
  2. CTRL+SHIFT+F to global search across those projects
  3. wait as the search takes a long time to execute

Expected behavior

The search should take a comparable time as it takes to run the same search directly with rg.

Screenshots or Videos

No response

Operating System Version

MacOS

Visual Studio Code Version

1.65.2

Additional context

No response

riccardoferretti commented 1 year ago

I am not sure how Foam can influence the search, only thing I can think of is that while Foam is indexing search would be slower (like everything else, see #1062). So I'd check whether that's the case (simply wait for Foam to be fully initialized (see the Foam logs in the output tab), then do a search).