Changes between Version 2 and Version 3 of QtScript


Ignore:
Timestamp:
Jul 27, 2010 10:45:35 AM (9 years ago)
Author:
kent.hansen@nokia.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QtScript

    v2 v3  
    125125'''Slow method resolution''': First, the possibility of a meta-method being overloaded means that all the methods need to be searched (including the superclass methods -- it's possible that a subclass overloads one of the superclass's methods!), and with QMetaObject you can only do a linear search.
    126126
    127 Second, in order to obtain the meta-types for the return type and arguments, some costly operations are performed: 1) The parameter types are extracted using QMetaMethod::parameterTypes(). 2) The type names are resolved to meta-type ids using QMetaType::type(). At least for built-in types (it's not safe for custom types because they can be unregistered), this information could be computed once and cached.
     127Second, in order to obtain the meta-types for the return type and arguments, some costly operations are performed: 1) The parameter types are extracted using QMetaMethod::parameterTypes(). 2) The type names are resolved to meta-type ids using QMetaType::type(). At least for built-in types, this information could be computed once and cached ((it's not safe for custom types because they can be unregistered).
    128128
    129129'''Supporting QScriptable''': The string-based (slow) QObject::qt_metacast() is used to determine if the object implements the QScriptable interface. This is done per method call / property access. This information should also be cached in the meta-method/property wrapper if possible.