Skip to content

Speed up nupkg extraction using mmap/CreateFileMapping #9807

Closed
NuGet/NuGet.Client
#3524

Description

@zkat

I was playing around with tarball extraction in Rust, trying to speed it up, when someone suggested using mmap for the destination files before writing to them (Windows version is CreateFileMapping). This resulted in a 4-5x speedup of a 7.5mb tarball containing 65k files -- going from 17-22s extraction times to a mere 3.5-4.5s.

I believe it's worth exploring doing this ourselves for .nupkg extraction during Restore -- it's unclear whether the extraction benefit is mainly for many small files, or whether fewer large files can still take advantage of this, but it's worth a shot anyway, for that kind of improvement!

Activity

  1. added
    Tenet:Performance
    on Jul 16, 2020
  2. added
    Type:DCR
    Priority:2
    Functionality:Install
    Category:Quality Week
    on Jul 16, 2020
  3. nkolev92 commented on Jul 16, 2020

    @nkolev92
    Member
  4. self-assigned this
    on Jul 27, 2020
  5. changed the title [-]Spike: Explore speeding up nupkg extraction using mmap/CreateFileMapping[/-] [+]Speed up nupkg extraction using mmap/CreateFileMapping[/+] on Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Category:Quality WeekFunctionality:InstallFunctionality:RestorePriority:2Tenet:PerformanceType:DCR

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions