Skip to content

Switch the pre22 warning to use CopyOnWriteArraySet.#23966

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_819190908
Oct 14, 2025
Merged

Switch the pre22 warning to use CopyOnWriteArraySet.#23966
copybara-service[bot] merged 1 commit intomainfrom
test_819190908

Conversation

@copybara-service
Copy link
Copy Markdown

Switch the pre22 warning to use CopyOnWriteArraySet.

This data structure is better for cases where writes are rare and reads common. When this warning path is it, the writes only occur exactly once per CVE-affected type, and reads occur once per every parse of those types.

Broadly people sensitive by this performance concern should really regen their gencode, but this should help take the edge off of people who first upgrade to 4.x and then look to incrementally regen any ancient gencode.

Fixes #23963

This data structure is better for cases where writes are rare and reads common. When this warning path is it, the writes only occur exactly once per CVE-affected type, and reads occur once per every parse of those types.

Broadly people sensitive by this performance concern should really regen their gencode, but this should help take the edge off of people who first upgrade to 4.x and then look to incrementally regen any ancient gencode.

Fixes #23963

PiperOrigin-RevId: 819238880
@copybara-service copybara-service bot merged commit c131253 into main Oct 14, 2025
@copybara-service copybara-service bot deleted the test_819190908 branch October 14, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance degradation in Java from duplicate warnings check

1 participant