Skip to content

Refactor: Find in files #1034

Closed
Closed

Description

@fxha

Description

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.

Activity

  1. Jocs commented on May 23, 2019

    @Jocs
    Member

    I also preferred the second solution, can you explain how it is compiled with SIMD?

  2. fxha commented on May 23, 2019

    @fxha
    ContributorAuthor

    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.

  3. self-assigned this
    on May 31, 2019
  4. added
    🦋 optimization
    on May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

🔭 area/editor🦋 optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions