Skip to content

Migrate from LineBreakIteratorPool to TextBreakIteratorCache#14573

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
litherum:eng/Migrate-from-LineBreakIteratorPool-to-TextBreakIteratorCache
Jun 2, 2023
Merged

Migrate from LineBreakIteratorPool to TextBreakIteratorCache#14573
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
litherum:eng/Migrate-from-LineBreakIteratorPool-to-TextBreakIteratorCache

Conversation

@litherum
Copy link
Copy Markdown
Contributor

@litherum litherum commented Jun 1, 2023

9ad6a13

Migrate from LineBreakIteratorPool to TextBreakIteratorCache
https://bugs.webkit.org/show_bug.cgi?id=257590
rdar://110097890

Reviewed by Yusuke Suzuki.

We have two different classes which do the same thing. I've been working
on deduplicating them, and this is the last step.

Microbenchmarks say there isn't a performance difference - presumably
because we're still using ICU to do line breaking. We're just using a
different intermediate class to get there. (And if the microbenchmarks
say there isn't a performance difference, then normal benchmarks certainly
won't say that there's a performance difference.)

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.cpp: Removed.
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.h: Removed.
* Source/WTF/wtf/text/TextBreakIterator.cpp:
(WTF::acquireLineBreakIterator): Deleted.
(WTF::releaseLineBreakIterator): Deleted.
(WTF::openLineBreakIterator): Deleted.
(WTF::closeLineBreakIterator): Deleted.
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::CachedTextBreakIterator::~CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::operator=):
(WTF::CachedTextBreakIterator::preceding const):
(WTF::CachedTextBreakIterator::following const):
(WTF::CachedTextBreakIterator::isBoundary const):
(WTF::LazyLineBreakIterator::get):
(WTF::LazyLineBreakIterator::resetStringAndReleaseIterator):
(WTF::LazyLineBreakIterator::~LazyLineBreakIterator): Deleted.
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
* Source/WebCore/rendering/BreakLines.h:
(WebCore::nextBreakablePosition):

Canonical link: https://commits.webkit.org/264825@main

c0447e5

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ❌ 🧪 ios-wk2 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🛠 jsc-armv7
✅ 🛠 tv-sim ✅ 🧪 jsc-armv7-tests
✅ 🛠 🧪 merge ✅ 🛠 watch ✅ 🛠 jsc-mips
✅ 🛠 watch-sim ✅ 🧪 jsc-mips-tests

@litherum litherum self-assigned this Jun 1, 2023
@litherum litherum added the Text For bugs in text layout and rendering, including international text support. label Jun 1, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 1, 2023
@litherum litherum removed the merging-blocked Applied to prevent a change from being merged label Jun 1, 2023
@litherum litherum force-pushed the eng/Migrate-from-LineBreakIteratorPool-to-TextBreakIteratorCache branch from 85f6215 to c0447e5 Compare June 1, 2023 19:05
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 1, 2023
Copy link
Copy Markdown
Member

@Constellation Constellation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@litherum litherum added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Jun 2, 2023
https://bugs.webkit.org/show_bug.cgi?id=257590
rdar://110097890

Reviewed by Yusuke Suzuki.

We have two different classes which do the same thing. I've been working
on deduplicating them, and this is the last step.

Microbenchmarks say there isn't a performance difference - presumably
because we're still using ICU to do line breaking. We're just using a
different intermediate class to get there. (And if the microbenchmarks
say there isn't a performance difference, then normal benchmarks certainly
won't say that there's a performance difference.)

* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.cpp: Removed.
* Source/WTF/wtf/text/LineBreakIteratorPoolICU.h: Removed.
* Source/WTF/wtf/text/TextBreakIterator.cpp:
(WTF::acquireLineBreakIterator): Deleted.
(WTF::releaseLineBreakIterator): Deleted.
(WTF::openLineBreakIterator): Deleted.
(WTF::closeLineBreakIterator): Deleted.
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::CachedTextBreakIterator::~CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedTextBreakIterator::operator=):
(WTF::CachedTextBreakIterator::preceding const):
(WTF::CachedTextBreakIterator::following const):
(WTF::CachedTextBreakIterator::isBoundary const):
(WTF::LazyLineBreakIterator::get):
(WTF::LazyLineBreakIterator::resetStringAndReleaseIterator):
(WTF::LazyLineBreakIterator::~LazyLineBreakIterator): Deleted.
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
* Source/WebCore/rendering/BreakLines.h:
(WebCore::nextBreakablePosition):

Canonical link: https://commits.webkit.org/264825@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Migrate-from-LineBreakIteratorPool-to-TextBreakIteratorCache branch from c0447e5 to 9ad6a13 Compare June 2, 2023 08:46
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 264825@main (9ad6a13): https://commits.webkit.org/264825@main

Reviewed commits have been landed. Closing PR #14573 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 9ad6a13 into WebKit:main Jun 2, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 2, 2023
@litherum litherum deleted the eng/Migrate-from-LineBreakIteratorPool-to-TextBreakIteratorCache branch June 6, 2023 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Text For bugs in text layout and rendering, including international text support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants