forked from qt-creator/qt-creator
CppEditor: Keep track of FilePath instead of QString
... in CppSourceProcessor::mergeEnvironment(). This is functionally equivalent as the scheme/host bits are identical within normal projects. The temporaries for path() were responsible for 10% of the time in the function, in total ~0.5% of the C++ parsing in my Creator-in-Creator setup. Change-Id: I7f4f163f0f4b46ebf876d631a8dc5fae667e9fd2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -364,9 +364,7 @@ void CppSourceProcessor::mergeEnvironment(Document::Ptr doc)
|
||||
if (!doc)
|
||||
return;
|
||||
|
||||
const QString fn = doc->filePath().path();
|
||||
|
||||
if (!Utils::insert(m_processed, fn))
|
||||
if (!Utils::insert(m_processed, doc->filePath()))
|
||||
return;
|
||||
|
||||
const QList<Document::Include> includes = doc->resolvedIncludes();
|
||||
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
QSet<Utils::FilePath> m_included;
|
||||
CPlusPlus::Document::Ptr m_currentDoc;
|
||||
QSet<QString> m_todo;
|
||||
QSet<QString> m_processed;
|
||||
QSet<Utils::FilePath> m_processed;
|
||||
QHash<Utils::FilePath, Utils::FilePath> m_fileNameCache;
|
||||
int m_fileSizeLimitInMb = -1;
|
||||
QTextCodec *m_defaultCodec;
|
||||
|
||||
Reference in New Issue
Block a user