Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133567

De-pessimize QString::normalized()

    XMLWordPrintable

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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes