aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-24 08:00:00 +0800
committerGravatar Runxi Yu2025-11-24 08:00:00 +0800
commitda17502293c424ef3654dbb4f31820253c9a5950 (patch)
treecef5f9ac8fdceeb9286d4720969df881b7d2475e
parentbyteorder: Purge (diff)
signatureNo signature
pack: Do not madvise
Apparently although it's not fully sequential, the general pattern is sort-of increasing in offsets as trees are being traversed.
-rw-r--r--pack_pack.go11
1 files changed, 0 insertions, 11 deletions
diff --git a/pack_pack.go b/pack_pack.go
index 6addf4fe..e85c65eb 100644
--- a/pack_pack.go
+++ b/pack_pack.go
@@ -534,17 +534,6 @@ func openPackFile(absPath, rel string) (*packFile, error) {
return nil, err
}
- err = syscall.Madvise(region, syscall.MADV_RANDOM)
- if err != nil {
- _ = syscall.Munmap(region)
- return nil, err
- }
- err = syscall.Madvise(region, syscall.MADV_WILLNEED)
- if err != nil {
- _ = syscall.Munmap(region)
- return nil, err
- }
-
return &packFile{
relPath: rel,
size: stat.Size(),