Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
Normalization is used on Darwin for every QFile::encodeName() and qgetenv(), so it's not completely esoteric even though most users won't use it explicitly.
There are two ways in which we can optimize:
- fromUtf8(), fromUtf16(), toUtf8() etc can have optional normalization flags, and the conversion is done in one go. This would already help the above-mentioned two users.
- in normalized(), decompose and compose steps are performed separately; in addition, the ascii check is done first, so we're iterating the whole string up to three times; and a fourth time, if we detach(); there must be a better way...