Problems with v8:
- Massive memory consumption – v8 is optimized for big apps
- High costs for property conversions etc
Big advance is no conversion costs (all e.g. work on QString). Also, QML is (mostly) strong typed, but we threw that information away with v4. Erik has been doing a lot of type information to add intermediate type information for optmizing code.
Finally we threw out the v8 dependency, and tried to get things working. After one week we had samegame running.
Last couple of weeks spent on fixing bugs, very close to be integrated in development branch.
Huge reduction of code base. So far we had 3 ways of evaluating bindings: v4 optimzier, snippets with sideeffects, other bindings, all replaced by v4m. We also can finally only parse the QML text once.
There’s also now no problems anymore with different engines in different threads … that didn’t use to work.
- Replace vme directly with JITed code. How about storing bytecode in file (compiled QML)? Possible, but not easy – data structures aren’t easy to dump right now.
- Simplifying the lookup context chain.
- We’ve to figure out what to do with the property cache.
- Add more API to QJsEngine/QJsValue to be a 90% replacement of QtScript
- Further optimizations for property accesses. E.g. directly call getters for C++ properties?
- Tracing of dependencies – right now there’s lots of interception going on. Maybe explicitly register proerty accesses in JIT code.
- Optimizing integer arithmetics – right now everything is converted to double.
Situation on iOS? Jitting works … if started from xcode. Fallback is interpeter. Mid term QML might be compiled at compile time.
Help is appreciated!