Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt translator efficiency
Forum Updated to NodeBB v4.3 + New Features

Qt translator efficiency

Scheduled Pinned Locked Moved Mobile and Embedded
4.8translatorembeddedtimemeasure
6 Posts 2 Posters 2.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #1

    Hi,

    I am curious to know how efficient, Qt's translator algorithm is written for the look up (source to translation).

    I was thinking about adding a timer before and stopping the timer after, the translator. Or, take the time snap before and take the time snap after the translation and check the difference.

    But this would give me just one string translation.

    My idea is to check, how much time it takes to translate the complete UI.

    Any heads up on how to measure the efficiency?

    Thanks,
    Kumara

    --Kumar

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That would partly depend on whether you have implemented dynamic translation (i.e. while the app is running) or at launch time. You would have to chase all tr calls.

      Out of curiosity, why do you want to do that ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        That would partly depend on whether you have implemented dynamic translation (i.e. while the app is running) or at launch time. You would have to chase all tr calls.

        Out of curiosity, why do you want to do that ?

        K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #3

        Hi Sam,

        I have got this question in my mind because,

        I am implementing, Translator as a library. So that, even Non-Qt applications can be benefited of Qt translator.
        Library may have an API - GetTranslation (string, language)
        This function, gets the string and uses the language and then uses Qt translator and translates, and it returns the translated string.

        Having this as a library, other processes can link this library and get the benefits.

        For example, if there is a process which manages Email, it has to translated the complete email content.
        Email process may call this function for 1000s of times to get the content translated.

        I was curious to know, will there be any performance impact.

        --Kumar

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          The problem I see with your use case is that you can't translate an email literally like that: you'll end up with some non-understandable text at the end

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          K 1 Reply Last reply
          0
          • SGaistS SGaist

            The problem I see with your use case is that you can't translate an email literally like that: you'll end up with some non-understandable text at the end

            K Offline
            K Offline
            kumararajas
            wrote on last edited by
            #5

            I completely understand because, the sentence has to be translated not the words.

            But just assume that, there is some one who needs to translate a 1000s of strings.

            They will be calling my API to get the translations. End up calling 1000 times.

            Do you see any performance impact?

            --Kumar

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              I'd say: benchmark it, so you'll know how much time it takes to do the match. Don't forget to load several dictionaries to match real-life setup

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved