Skip to content

Commit

Permalink
Update regex and globset to pull in memory usage fixes
Browse files Browse the repository at this point in the history
Summary:
BurntSushi has fixed a memory usage regression introduced by regex 1.9 which caused Buck to allocate and retain significantly more memory when using moderately sized `buck2_common::ignores::ignore_set::IgnoreSet` objects concurrently from many threads.

- Bug report: **[rust-lang/regex#1059](rust-lang/regex#1059) *"1.9 memory usage: globset-generated RegexSet allocates and retains 48× more memory (600MB) vs regex 1.8"***

- Globset fix: **[BurntSushi/ripgrep#25770](https://github.com/BurntSushi/ripgrep/pull/25770) *"globset: use non-capture groups in regex transform"***

- Regex fix: **[rust-lang/regex#1062](rust-lang/regex#1062) *"fix memory usage regression for RegexSet with capture groups"***

Reviewed By: zertosh

Differential Revision: D48095372

fbshipit-source-id: ec11c2bcaccbd26354d6d0a0398000134eaf3681
  • Loading branch information
David Tolnay authored and facebook-github-bot committed Aug 5, 2023
1 parent a1b257d commit 469cbbc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion below/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ model = { package = "below-model", version = "0.7.1", path = "model" }
once_cell = "1.12"
plain = "0.2"
procfs = { package = "fb_procfs", version = "0.7.1", path = "procfs" }
regex = "1.6.0"
regex = "1.9.2"
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
signal-hook = "0.3"
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
Expand Down
2 changes: 1 addition & 1 deletion below/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ chrono = { version = "0.4", features = ["clock", "serde", "std"], default-featur
cursive = { version = "0.20.0", features = ["crossterm-backend"], default-features = false }
humantime = "2.1"
once_cell = "1.12"
regex = "1.6.0"
regex = "1.9.2"
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
slog-term = "2.8"
walkdir = "2.3"
Expand Down
2 changes: 1 addition & 1 deletion below/dump/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ clap = { version = "4.3.5", features = ["derive", "env", "string", "unicode", "w
common = { package = "below-common", version = "0.7.1", path = "../common" }
model = { package = "below-model", version = "0.7.1", path = "../model" }
once_cell = "1.12"
regex = "1.6.0"
regex = "1.9.2"
render = { package = "below-render", version = "0.7.1", path = "../render" }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
Expand Down
2 changes: 1 addition & 1 deletion below/model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gpu-stats = { package = "below-gpu-stats", version = "0.7.1", path = "../gpu_sta
hostname = "0.3"
os_info = "3.0.7"
procfs = { package = "fb_procfs", version = "0.7.1", path = "../procfs" }
regex = "1.6.0"
regex = "1.9.2"
serde = { version = "1.0.176", features = ["derive", "rc"] }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
slog = { version = "2.7", features = ["max_level_trace", "nested-values"] }
Expand Down

0 comments on commit 469cbbc

Please sign in to comment.