QmlJS: Fix performance problem in Snapshot.

Don't use QMultiHash::values(key), it rebuilds the values list from
scratch for each lookup.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-08-31 10:23:48 +02:00
parent 3499fcb18e
commit 2e8ec2f9e6
2 changed files with 9 additions and 4 deletions

View File

@@ -146,7 +146,7 @@ class QMLJS_EXPORT Snapshot
{
typedef QHash<QString, Document::Ptr> _Base;
QHash<QString, Document::Ptr> _documents;
QMultiHash<QString, Document::Ptr> _documentsByPath;
QHash<QString, QList<Document::Ptr> > _documentsByPath;
QHash<QString, LibraryInfo> _libraries;
public: