You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Mark Text don't really searches the keyword in all files on the disk. Rather Mark Text creates a list of markdown files with content (that is not updated on disk changes) and search in memory using the tree view. The above behavior has several issues and should already be replaced in v0.14.0. This issue should track the status of the refactoring and to suggest possible solutions.
Suggested solutions
1. node filesystem library:
Recursively search all files and directories, open each file and search for the keyword/regex. This process should be done in another thread or process (in parallel).
2. ripgrep:
ripgrep is a line-oriented search tool that recursively searches your current directory for a regex pattern.
My preferred option: ripgrep is a fast CLI tool written in Rust that can also be compiled with SIMD. We could use/implement a similar parser like vscode does.
Please see the documentation but you need the nightly rust compiler and I don't know whether they provide a runtime check and fallback to ref. implementation. We should include the official binary without SIMD and allow the user to change the path to ripgrep (or try to use the system one). If they don't include runtime checks + fallback the binary will crash on CPUs without these instructions.
Activity
Jocs commentedon May 23, 2019
I also preferred the second solution, can you explain how it is compiled with SIMD?
fxha commentedon May 23, 2019
Please see the documentation but you need the nightly rust compiler and I don't know whether they provide a runtime check and fallback to ref. implementation. We should include the official binary without SIMD and allow the user to change the path to ripgrep (or try to use the system one). If they don't include runtime checks + fallback the binary will crash on CPUs without these instructions.