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 e64e6ce commit 924b72f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -26,7 +26,7 @@ num_enum = "0.5"
ocamlrep = { path = "vendor/ocaml/interop/ocamlrep" }
ocamlrep_ocamlpool = { path = "vendor/ocaml/interop/ocamlrep_ocamlpool" }
phf = { version = "0.11", features = ["macros"] }
regex = "1.6.0"
regex = "1.9.2"
rust_to_ocaml_attr = { path = "vendor/ocaml/interop/rust_to_ocaml/rust_to_ocaml_attr" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
thiserror = "1.0.43"
Expand Down
2 changes: 1 addition & 1 deletion vendor/ocaml/interop/shim/third-party/rust/Cargo.toml
Expand Up @@ -22,7 +22,7 @@ md-5 = "0.10"
once_cell = "1.12"
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
regex = "1.6.0"
regex = "1.9.2"
rustc-hash = "1.1.0"
serde = { version = "1.0.176", features = ["derive", "rc"] }
similar = { version = "2.2.0", features = ["inline"] }
Expand Down
2 changes: 1 addition & 1 deletion vendor/ocaml/interop/signed_source/Cargo.toml
Expand Up @@ -13,5 +13,5 @@ bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
hex = "0.4.3"
md-5 = "0.10"
once_cell = "1.12"
regex = "1.6.0"
regex = "1.9.2"
thiserror = "1.0.43"

0 comments on commit 924b72f

Please sign in to comment.