Skip to content

Commit

Permalink
Fork Guava's CompactHashMap into Bazel as it is not public in Guava.
Browse files Browse the repository at this point in the history
CompactHashMap can substantially reduce runtime and especially generated
garbage in various places.

RELNOTES: None.
PiperOrigin-RevId: 247011181
  • Loading branch information
djasper-gh authored and copybara-github committed May 7, 2019
1 parent c28bc24 commit 291678d
Show file tree
Hide file tree
Showing 3 changed files with 929 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ filegroup(
"//src/main/java/com/google/devtools/build/lib/bazel/debug:srcs",
"//src/main/java/com/google/devtools/build/lib/clock:srcs",
"//src/main/java/com/google/devtools/build/lib/cmdline:srcs",
"//src/main/java/com/google/devtools/build/lib/collect/compacthashmap:srcs",
"//src/main/java/com/google/devtools/build/lib/collect/compacthashset:srcs",
"//src/main/java/com/google/devtools/build/lib/collect/nestedset:srcs",
"//src/main/java/com/google/devtools/build/lib/collect:srcs",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package(default_visibility = ["//src:__subpackages__"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//src/main/java/com/google/devtools/build/lib:__pkg__"],
)

# Library of collection utilities.
java_library(
name = "compacthashmap",
srcs = glob([
"*.java",
]),
deps = [
"//third_party:guava",
"//third_party:jsr305",
],
)
Loading

0 comments on commit 291678d

Please sign in to comment.