Skip to content

ICU-23592 Bound CollationBuilder canonical closure work - #4326

Open
FrankYFTang wants to merge 1 commit into
unicode-org:mainfrom
FrankYFTang:fix-icu-23592
Open

FrankYFTang wants to merge 1 commit into
unicode-org:mainfrom
FrankYFTang:fix-icu-23592

Conversation

@FrankYFTang

@FrankYFTang FrankYFTang commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Bound CollationBuilder canonical closure work per rule and per builder in both ICU4C and ICU4J:

  • Track per-rule (kClosureLoopLimit = 2400, kClosureWorkLimit = 160000 UTF-16 units) and per-builder (kTotalClosureLoopLimit = 4800, kTotalClosureWorkLimit = 320000 UTF-16 units) canonical closure budgets in CollationBuilder::addOnlyClosure (U_INPUT_TOO_LONG_ERROR in C++, ICUInputTooLongException in Java), charging non-trivial candidates prior to ignorePrefix / ignoreString while keeping NFD-inert mappings free.
  • Add unit tests TestICU23592 in both ICU4C (regcoll.cpp) and ICU4J (CollationRegressionTest.java).

Checklist

  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-23592
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

@FrankYFTang FrankYFTang changed the title ICU-23592 Bound CollationBuilder canonical closure work and speed up transient context tries ICU-23592 Bound CollationBuilder canonical closure work Oct 28, 2026
@jira-pull-request-webhook

Copy link
Copy Markdown

Notice: the branch changed across the force-push!

  • icu4c/source/i18n/collationbuilder.cpp is different
  • icu4c/source/i18n/collationbuilder.h is different
  • icu4c/source/i18n/collationdatabuilder.cpp is no longer changed in the branch
  • icu4c/source/i18n/collationdatabuilder.h is no longer changed in the branch
  • icu4c/source/test/intltest/regcoll.cpp is different
  • icu4j/main/collate/src/main/java/com/ibm/icu/impl/coll/CollationBuilder.java is different
  • icu4j/main/collate/src/main/java/com/ibm/icu/impl/coll/CollationData.java is no longer changed in the branch
  • icu4j/main/collate/src/main/java/com/ibm/icu/impl/coll/CollationDataBuilder.java is no longer changed in the branch
  • icu4j/main/collate/src/test/java/com/ibm/icu/dev/test/collator/CollationRegressionTest.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

This branch has not been deployed

No deployments
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.

2 participants