Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-17371 stream filter to replace xmlns with DOCTYPE #3511

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

srl295
Copy link
Member

@srl295 srl295 commented Feb 21, 2024

CLDR-17371

  • This PR completes the ticket.

ALLOW_MANY_COMMITS=true

@srl295 srl295 requested review from macchiati and a team February 21, 2024 20:36
@srl295 srl295 self-assigned this Feb 21, 2024
@srl295 srl295 changed the title 🚧 CLDR-17371 stream filter to replace xmlns with DOCTYPE CLDR-17371 stream filter to replace xmlns with DOCTYPE Feb 21, 2024
@srl295
Copy link
Member Author

srl295 commented Feb 21, 2024

kbd-check fails because of the xmlns, to be addressed on the keyman side in keymanapp/keyman#10803

@srl295 srl295 removed the incomplete label Feb 21, 2024
@srl295
Copy link
Member Author

srl295 commented Feb 21, 2024

@macchiati I don't think this PR needs to block the spec, this PR is to show that the spec is supportable in Java. (once tests pass!)

So, I'm OK to leave this PR open and make improvements if needed. API changes, optimization etc

@srl295 srl295 requested review from macchiati and a team February 21, 2024 22:44
@macchiati
Copy link
Member

@macchiati I don't think this PR needs to block the spec, this PR is to show that the spec is supportable in Java. (once tests pass!)

So, I'm OK to leave this PR open and make improvements if needed. API changes, optimization etc

Makes sense

@srl295
Copy link
Member Author

srl295 commented Feb 22, 2024

I measured 11s±1s for 1,000 iterations. - about 11ms per iteration to load and validate common/main/mt.xml. No significant difference between using and not using the wrap() function.

There is perhaps even a slight improvement (due to read-ahead or inefficiencies in the XML parser?) when using the wrap. The quick-check for <!DOCTYPE is now at the byte or char array level and runs pretty quickly.

@macchiati
Copy link
Member

macchiati commented Feb 22, 2024 via email

@srl295
Copy link
Member Author

srl295 commented Feb 22, 2024

I'm a bit confused. Are you saying that it takes 11s / 1000 iterations with the wrap and approximately the same without?

11s/1000, sorry. I'm re-running the tests.

@srl295 srl295 force-pushed the kbd/cldr-17371/xmlns-patch-dtd branch from 9ffb82d to a2e084a Compare February 22, 2024 19:36
@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • tools/cldr-code/src/test/java/org/unicode/cldr/util/TestDoctypeXmlStreamWrapper.java is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@srl295
Copy link
Member Author

srl295 commented Feb 22, 2024

image

I'm getting setup to run on a less busy system

@srl295
Copy link
Member Author

srl295 commented Feb 22, 2024

Raw results.
10,000 iterations (faster, different, nearly idle system)

  <testcase name="TestBytePerf(boolean)[1] wrapped=false" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="74.146"/>
  <testcase name="TestBytePerf(boolean)[2] wrapped=true" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="74.809"/>
  <testcase name="TestBytePerf(boolean)[3] wrapped=false" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="76.95"/>
  <testcase name="TestBytePerf(boolean)[4] wrapped=true" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="75.434"/>
  <testcase name="TestBytePerf(boolean)[5] wrapped=false" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="77.519"/>
  <testcase name="TestBytePerf(boolean)[6] wrapped=true" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="74.999"/>
  <testcase name="TestBytePerf(boolean)[7] wrapped=false" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="77.698"/>
  <testcase name="TestBytePerf(boolean)[8] wrapped=true" classname="org.unicode.cldr.util.TestDoctypeXmlStreamWrapper" time="77.906"/>

macchiati
macchiati previously approved these changes Feb 24, 2024
@srl295
Copy link
Member Author

srl295 commented Feb 24, 2024

Thanks. @macchiati ok to move ticket to accepted ? (Had sent mail to TC)

@macchiati
Copy link
Member

macchiati commented Feb 24, 2024 via email

@srl295
Copy link
Member Author

srl295 commented Feb 24, 2024

Ok, you can. Assuming pk =ok

Failing build step is not CLDR tests, it's the Keyman compiler now out of date with these PRs. Once they merge I can fix it.

@srl295 srl295 force-pushed the kbd/cldr-17371/xmlns-patch-dtd branch from 98b6724 to b633428 Compare February 27, 2024 00:35
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@macchiati
Copy link
Member

Looks like the tests fail

@mcdurdin
Copy link
Contributor

Looks like the tests fail

as @srl295 wrote previously:

Failing build step is not CLDR tests, it's the Keyman compiler now out of date with these PRs. Once they merge I can fix it.

He is working on a PR to the Keyman compiler to allow the <keyboard3 xmlns attribute in the validation phase in the compiler, once that merges then that will resolve the test here.

@srl295
Copy link
Member Author

srl295 commented Feb 27, 2024

Looks like the tests fail

CLDR's unit tests pass.

@srl295
Copy link
Member Author

srl295 commented Feb 27, 2024

Looks like the tests fail

CLDR's unit tests pass.

I've disabled the keyboard check workflow for now. I'll re enable it once these merge and I can update the compiler to the changed spec.

@srl295
Copy link
Member Author

srl295 commented Feb 27, 2024

ping, can i get a review on this? All unit tests pass.

@srl295 srl295 merged commit 60df7f1 into unicode-org:main Feb 27, 2024
10 of 11 checks passed
@srl295 srl295 deleted the kbd/cldr-17371/xmlns-patch-dtd branch February 27, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants