Hi, the QML engine "freezes" the global JS object. This is apparently(?) to prevent accidental writes to the global object. For those who don't know, the global object in JS provides objects and properties available in global scope, such as "console" (for console.log) or "qsTr".
Now, it turned out that freezing the global object takes a lot of time with v8 on BB10 devices. Even in release mode, just the call to freeze the global object makes the startup time 100ms longer. v8 seems to have an implmentation of freezing that is suboptimal, see for example the benchmark at http://jsperf.com/performance-frozen-object. Note this benchmark is for iterating over properties of frozen objects, not freezing an object, though likely freezing an object would get similar benchmark results. Could we maybe simple get rid of object freezing, and not freeze the global object? What would the consequences of that be, anything bad? I am the opinion that if the user wants to override the "console" object, let him. Maybe there were other reasons for freezing the global object though? Regards, Thomas -- ** Qt Developer Conference: http://qtconference.kdab.com/ ** Thomas McGuire | [email protected] | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
