diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-09-05 19:48:30 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-09-06 18:10:44 +0000 |
commit | ec95ed168ace9358596d995c984ba969cb9975ca (patch) | |
tree | 6ef69786b6979e8884981ad62abdeb2c5caa8583 /src/render/backend/stringtoint_p.h | |
parent | 6000d6f561f284b57312c7a5274ec724aaac44e9 (diff) |
Fix StringToInt implementation
Reduces the overhead per call of lookupId() from around 7000 to 180
instructions for a use case. Should in general scale much better.
I still do not like that this is using global static data that is
never cleaned up. It should be tied at the minimum to the lifetime
of the Qt 3D scene.
Change-Id: I777a2bbf2d765f4b0fc9e3d2b06692c7260f5a9f
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/backend/stringtoint_p.h')
-rw-r--r-- | src/render/backend/stringtoint_p.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/render/backend/stringtoint_p.h b/src/render/backend/stringtoint_p.h index 2d9e566fb..996cecf33 100644 --- a/src/render/backend/stringtoint_p.h +++ b/src/render/backend/stringtoint_p.h @@ -67,11 +67,6 @@ public: static int lookupId(const QString &str); static int lookupId(QLatin1String str); static QString lookupString(int idx); - -private: - static QVector<QString> m_stringsArray; - static QVector<QString> m_pendingStringsArray; - static int m_calls; }; } // Render |