Replace unicode-general-category
w/ unicode-properties
.
#71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What prompted me to look at
unicode-general-category
was these build timings:While
ttf-parser
preventsrustybuzz
from starting its compilation earlier anyway, it still seemed weird that only one of severalunicode-*
deps was so much more involved than the others.(And within a large build, it is possible that such a serial dependency would have an impact)
The description of
unicode-general-category
seemed to suggest it was used for performance reasons, and I spent some time optimizing away some low-hanging fruit (it wastes over half a second just on not using buffered IO, but also it generates Rust source code instead of binary blobs, and there's a few more things like that).But then I noticed something: the
yeslogic
org has a bunch ofunicode-*
crates, but most of them are prefixed withyeslogic-
oncrates.io
(since they're alternatives to e.g.unicode-rs
crates).And there's no any other obvious choice of a crate for querying "general category", not on
crates.io
. Which leads me to believe the use of anyeslogic
crate wasn't intentional but rather accidental/incidental (as it looked like the only option, and it didn't have a prefix that would make it seem out of place).There are two blockers for this PR:
the replacement I use (unicode-rs
'unicode-properties
crate) is not published oncrates.io
yet, for some reason (cc @crlf0710 @Manishearth)I had to replace all the variant uses, because of the different naming convention at playifyeslogic
is not responsible for its convention (and instead it comes from e.g.ucd-generate
), it may be worth havingunicode-properties
use that one too, requiring no changes torustybuzz
at use sites