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 e7bce48 commit febae96
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 17 deletions.
12 changes: 6 additions & 6 deletions hphp/hack/src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion hphp/hack/src/hackc/Cargo.toml
Expand Up @@ -55,7 +55,7 @@ positioned_full_trivia_parser = { version = "0.0.0", path = "../parser/api/cargo
positioned_parser = { version = "0.0.0", path = "../parser/api/cargo/positioned_parser" }
profile_rust = { version = "0.0.0", path = "../utils/perf/cargo/profile" }
rayon = "1.2"
regex = "1.6.0"
regex = "1.9.2"
relative_path = { version = "0.0.0", path = "../utils/rust/relative_path" }
sem_diff = { version = "0.0.0", path = "sem_diff" }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
Expand Down
2 changes: 1 addition & 1 deletion hphp/hack/src/hackc/emitter/cargo/emit_unit/Cargo.toml
Expand Up @@ -36,7 +36,7 @@ options = { version = "0.0.0", path = "../../../compile/cargo/options" }
oxidized = { version = "0.0.0", path = "../../../../oxidized" }
oxidized_by_ref = { version = "0.0.0", path = "../../../../oxidized_by_ref" }
print_expr = { version = "0.0.0", path = "../../../print_expr" }
regex = "1.6.0"
regex = "1.9.2"
scope = { version = "0.0.0", path = "../scope" }
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
stack_depth = { version = "0.0.0", path = "../../../utils/cargo/stack_depth" }
Expand Down
2 changes: 1 addition & 1 deletion hphp/hack/src/hackc/print_expr/Cargo.toml
Expand Up @@ -21,6 +21,6 @@ hhbc_string_utils = { version = "0.0.0", path = "../utils/cargo/hhbc_string_util
lazy_static = "1.4"
naming_special_names_rust = { version = "0.0.0", path = "../../naming" }
oxidized = { version = "0.0.0", path = "../../oxidized" }
regex = "1.6.0"
regex = "1.9.2"
thiserror = "1.0.43"
write_bytes = { version = "0.0.0", path = "../../utils/write_bytes/write_bytes" }
Expand Up @@ -15,7 +15,7 @@ lazy_static = "1.4"
libc = "0.2.139"
naming_special_names_rust = { version = "0.0.0", path = "../../../../naming" }
ocaml_helper = { version = "0.0.0", path = "../../../../utils/ocaml_helper" }
regex = "1.6.0"
regex = "1.9.2"

[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false }
2 changes: 1 addition & 1 deletion hphp/hack/src/parser/lowerer/Cargo.toml
Expand Up @@ -21,7 +21,7 @@ naming_special_names_rust = { version = "0.0.0", path = "../../naming" }
ocaml_helper = { version = "0.0.0", path = "../../utils/ocaml_helper" }
oxidized = { version = "0.0.0", path = "../../oxidized" }
parser_core_types = { version = "0.0.0", path = "../cargo/core_types" }
regex = "1.6.0"
regex = "1.9.2"
relative_path = { version = "0.0.0", path = "../../utils/rust/relative_path" }
rescan_trivia = { version = "0.0.0", path = "../api/cargo/rescan_trivia" }
stack_limit = { version = "0.0.0", path = "../../utils/stack_limit" }
Expand Down
2 changes: 1 addition & 1 deletion hphp/hack/src/utils/config_file/rust/Cargo.toml
Expand Up @@ -11,6 +11,6 @@ path = "config_file.rs"
[dependencies]
bstr = { version = "1.4.0", features = ["serde", "std", "unicode"] }
lazy_static = "1.4"
regex = "1.6.0"
regex = "1.9.2"
serde_json = { version = "1.0.100", features = ["float_roundtrip", "unbounded_depth"] }
sha1 = "0.10.5"
2 changes: 1 addition & 1 deletion hphp/hack/src/utils/files_to_ignore/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ edition = "2021"
path = "../files_to_ignore.rs"

[dependencies]
regex = "1.6.0"
regex = "1.9.2"
Expand Up @@ -18,7 +18,7 @@ oxidized = { version = "0.0.0", path = "../../../../oxidized" }
parser_core_types = { version = "0.0.0", path = "../../../../parser/cargo/core_types" }
proc-macro2 = { version = "1.0.64", features = ["span-locations"] }
quote = "1.0.29"
regex = "1.6.0"
regex = "1.9.2"
relative_path = { version = "0.0.0", path = "../../../rust/relative_path" }
rust_parser_errors = { version = "0.0.0", path = "../../../../parser/cargo/errors" }
serde = { version = "1.0.176", features = ["derive", "rc"] }
Expand Down
2 changes: 1 addition & 1 deletion hphp/hack/src/utils/html_entities/Cargo.toml
Expand Up @@ -11,7 +11,7 @@ path = "html_entities.rs"
[dependencies]
lazy_static = "1.4"
ocaml_helper = { version = "0.0.0", path = "../ocaml_helper" }
regex = "1.6.0"
regex = "1.9.2"

[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false }
2 changes: 1 addition & 1 deletion hphp/hack/src/utils/multifile/Cargo.toml
Expand Up @@ -11,7 +11,7 @@ path = "../multifile.rs"
[dependencies]
anyhow = "1.0.71"
lazy_static = "1.4"
regex = "1.6.0"
regex = "1.9.2"

[dev-dependencies]
pretty_assertions = { version = "1.2", features = ["alloc"], default-features = false }
2 changes: 1 addition & 1 deletion hphp/hack/src/utils/rust/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 febae96

Please sign in to comment.