Commit b2369973 authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Fix a performance problem.

In order to determine all components that instantiate a given component,
Bind::usesQmlPrototype was called on each document in the snapshot.
That, in turn, had to iterate over all object definitions inside the
document, resolving their prototype references.

All in all, it lead to a very large amount of fairly expensive lookups
that were slowing down Creator considerably.

Reviewed-by: Erik Verbruggen
parent 9eea942a
......@@ -93,6 +93,9 @@ Interpreter::ObjectValue *Bind::findQmlObject(AST::Node *node) const
bool Bind::usesQmlPrototype(ObjectValue *prototype,
const Context *context) const
// ### This function is disabled for performance reasons.
return false;
foreach (ObjectValue *object, _qmlObjects.values()) {
const ObjectValue *resolvedPrototype = object->prototype(context);
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