Editors Note: This is a post that’s part of a series on Platform Engineering at Appcelerator.
It’s been a bit since our last update, so we wanted to take a moment and give you a sneak peek at what’s coming in the 1.8.0 release of Titanium Mobile. The big new feature is the addition of V8 as a runtime for Android based apps which we talked about in our September update. We have also spent quite a bit of time working on our APIDoc system and updating the docs to provide better information as well as additional information that can be used for context-sensitive help. Visit JIRA for the lists of all 1.8.0 changes, Android changes, iOS changes and APIDoc changes.
Android Runtimes: Rhino and V8
tiapp.xml. We are expecting to have the pull request for the multi-runtime version in review by Monday, October 31st. As soon as we’re confident it’s stable enough, it will be merged onto master and start appearing in our continuous integration builds. For those of you currently using CI 1.8.0 for your applications, we will provide a snapshot of the last-known good build prior the merge. Once it’s merged we will be spending the majority of our time fixing critical issues in preparation for release. At this point we are still looking good for a release of 1.8.0 before year end.
Updated V8 vs Rhino Performance Analysis
Now that we’re closer to integrated runtimes, we can show some actual performance results. The test code, data, and execution details are here. Keep in mind that we have not started optimizing either of the runtimes yet so there may still be room for improvement.
Four areas were profiled: Time to start the application, time to parse a nested json string, inserting 1000 rows into a tableview, and number of scroll events fired in the large tableview.
|Test||Runtime Avg in Milliseconds|
|Rhino||V8||V8 vs Rhino|
|TableView Scroll ms/Event||29.3||6.1||4.80|
Startup time for both runtimes is almost identical for the test app. Larger source files would show a better edge for V8. We hope to be able to improve startup to first display after beta. The other tests show significant performance gains for V8 over Rhino which is consistent with our early prototyping.
On devices where the user has installed Flash you can now display it in a WebView. We’ve noticed that the performance of Flash in the WebView is sluggish on handsets, but it is at least possible now. Full Feature List
- [TIMOB-1607] Android: WebView Enable Plugins
- [TIMOB-4801] Android: Enable flashplayer settings(plugins) for WebView on Android
Several events on iOS passed a
globalpoint property that couldn’t easily be made consistent cross-platform. So we added a new method
convertPointToView, which is much more useful by allowing points to be converted from one view to another, rather than just operating solely within the screen coordinate system, which is how globalpoint worked.
- [TIMOB-5122] Android: Add a member function to View called ‘convertPointToView’
- [TIMOB-5121] iOS: Add a member function to View called ‘convertPointToView’
- [TIMOB-4916] Android: Change TableView appendRow to support an array of rows or row data
- [TIMOB-4917] iOS: Change TableView appendRow to support an array of rows or row data
Several Android specific items were added. You can now set the pixel format of a window to reduce memory used or improve display quality if you are using gradients for example. Some applications need to keep the display on while the application is active, so we exposed the ability to request the screen stay on. Finally, longpress has been added to the set of supported gestures.
- [TIMOB-4104] Android: Expose Window Pixel Format
- [TIMOB-2102] Android: Expose Keep Screen On
- [TIMOB-1653] Android: Need support for longpress event
Several iOS-specific items were added as well. New events were added to ScrollView to report where dragging starts and stops. You can now capture high density screenshots and HTTPClient data has local caching support to reduce trips across the wire.
- [TIMOB-4487] iOS: Expose dragStart and dragEnd on ScrollView
- [TIMOB-4466] iOS: High Density Screenshots
- [TIMOB-4691] iOS: Add support or local caching for HXR content (using disk cache)
Another exciting addition to our product is an improved documentation system for our APIDocs. We published our TDoc Specification for our APIDoc and have been reworking the docs to comply with the spec. While the real magic is hidden in the source, we’re able to actually use the documentation as the specification for the Titanium Mobile API. Our documentation now gets used as an HTML reference, in content assist, provides coverage data for platform parity analysis, and may be generated in other formats as required.
Another gain is that we can annotate APIs to the method and property level with supported platforms, versions supported, deprecations, exclusions, and more. The new docs may not be perfect, but we can now address the failings as they’re found.
We will be bundling a BETA version of our Mobile Web SDK with the 1.8.0 release as well. The API documentation will be updated to show APIs supported on Mobile Web.