Skip to content

--files performance regression in 0.8.0 #820

@chrmarti

Description

@chrmarti

What version of ripgrep are you using?

0.8.0

What operating system are you using ripgrep on?

Windows 10

If this is a bug, what are the steps to reproduce the behavior?

Using an old commit of the Chromium sources (git clone https://chromium.googlesource.com/chromium/src) as corpus (~230k files).

With 0.8.0 --files runs about 4x longer:

PS C:\devel\testWorkspace> (Measure-Command { & 'C:\devel\ripgrep-0.8.0-x86_64-pc-windows-msvc\rg.exe' --files | Measure-Object –Line | Out-Default }).TotalSeconds

 Lines Words Characters Property
 ----- ----- ---------- --------
234319 [files]

43.309153 [seconds]

Than with 0.7.1:

PS C:\devel\testWorkspace> (Measure-Command { & 'C:\devel\ripgrep-0.7.1-x86_64-pc-windows-msvc\rg.exe' --files | Measure-Object –Line | Out-Default }).TotalSeconds

 Lines Words Characters Property
 ----- ----- ---------- --------
234319 [files]

11.2432563 [seconds]

Using Process Monitor it looks like 0.8.0 accesses individual files a lot more:
image

Than 0.7.1, which seems to only access folders:
image

/cc @roblourens

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions