summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-03 17:05:33 +0200
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2015-08-05 08:20:13 +0000
commit1a5707e6fb7bedaff83ac5db088c343afce155ff (patch)
tree2c2405b5c6a6da42c7dbc58d8933e1b65939afd7 /src
parent8c5e63fae7509b6dcc8a3d4387e5d27093ede7fc (diff)
downloadqbs-1a5707e6fb7bedaff83ac5db088c343afce155ff.tar.gz
Fix performance regression when importing JS files.
A side effect of the bugfix commit 33c9a2721b was that two imports of the same file were no longer considered the same if the import location differed. This results in a considerable slowdown due to more cache misses, so restore the old behvior in this regard. Also, JSImport's qHash() and operator==() are now consistent. Change-Id: I23acd665a6329ec1ab132cb34657f0b05357093f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/language/jsimports.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/language/jsimports.h b/src/lib/corelib/language/jsimports.h
index 0cbceeea2..c539a0b76 100644
--- a/src/lib/corelib/language/jsimports.h
+++ b/src/lib/corelib/language/jsimports.h
@@ -53,7 +53,7 @@ public:
QStringList filePaths;
CodeLocation location;
};
-inline uint qHash(const JsImport &jsi) { return qHash(jsi.location.toString()); }
+inline uint qHash(const JsImport &jsi) { return qHash(jsi.scopeName); }
typedef QList<JsImport> JsImports;