Commit b6d0ca20 authored by Tobias Hunger's avatar Tobias Hunger

GccToolChain: Make macro cache bigger

16 entries is tight alrealdy for Qt Creator, so leave more room to avoid
retrievivng the same information over and over again for bigger projects.

Change-Id: I92239df2449cec20d1dbd9aaae98d88c08d2a241
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent 3529e785
......@@ -245,7 +245,7 @@ GccToolChain::GccToolChain(Detection d) :
GccToolChain::GccToolChain(Core::Id typeId, Detection d) :
ToolChain(typeId, d),
m_predefinedMacrosCache(std::make_shared<Cache<QVector<Macro>>>()),
m_predefinedMacrosCache(std::make_shared<Cache<QVector<Macro>, 64>>()),
m_headerPathsCache(std::make_shared<Cache<QList<HeaderPath>>>())
{ }
......@@ -385,7 +385,7 @@ ToolChain::PredefinedMacrosRunner GccToolChain::createPredefinedMacrosRunner() c
const QStringList platformCodeGenFlags = m_platformCodeGenFlags;
OptionsReinterpreter reinterpretOptions = m_optionsReinterpreter;
QTC_CHECK(reinterpretOptions);
std::shared_ptr<Cache<QVector<Macro>>> macroCache = m_predefinedMacrosCache;
std::shared_ptr<Cache<QVector<Macro>, 64>> macroCache = m_predefinedMacrosCache;
Core::Id lang = language();
// This runner must be thread-safe!
......
......@@ -235,7 +235,7 @@ private:
mutable QList<HeaderPath> m_headerPaths;
mutable QString m_version;
mutable std::shared_ptr<Cache<QVector<Macro>>> m_predefinedMacrosCache;
mutable std::shared_ptr<Cache<QVector<Macro>, 64>> m_predefinedMacrosCache;
mutable std::shared_ptr<Cache<QList<HeaderPath>>> m_headerPathsCache;
friend class Internal::GccToolChainConfigWidget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment