[
https://issues.apache.org/jira/browse/CB-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13450164#comment-13450164
]
Andrew Grieve commented on CB-638:
----------------------------------
What an excellent time to ask for an update! I've got some fresh measurements
to share.
All of the modes are already checked in to the main repo, but I've got several
local tweaks & changes (mostly for online events) that I'm holding off merging
until 2.1.0 is out the door. You can see them here:
https://github.com/agrieve/incubator-cordova-js/commits/navigatorconn
https://github.com/agrieve/incubator-cordova-android/commits/exec
Timings from today:
https://docs.google.com/spreadsheet/ccc?key=0Aq9kFRDB1QGhdEtZZENBMThLSDdRUVJfRUFzVW5LSVE#gid=0
The updated todo list is:
* Make the native side set the online state to on/off on start-up just in case
it one day doesn't default to ON at start-up.
* Make poll retrieve all pending messages instead of one-at-a-time.
* Make poll retrieve a list of callback responses that it can pass to
cordova.callbackSuccess/callbackFailure directly (to save on eval() cost)
* Use a thread-pool in PluginManager instead of spinning up a new thread every
time
* Redo benchmarks
Updates on my thinking:
* LOCATION_CHANGE is not faster for the async case (I wasn't thinking straight
when I said this), it is faster only for calls that have no return values.
* Due to the way exec always requires a callback (either win or fail), this
never applies!
* It could be made to work if we faked the success callback from JS and
update all platforms to not send the OK from native code. This is not worth the
effort.
* Adding fail-safe logic for PRIVATE_API is probably not worth it, as it
currently looks like ONLINE_EVENTS is just as fast (and maybe faster after more
optimizing). Let's not use it if there's no big win.
> Slow native bridge (especially android)
> ---------------------------------------
>
> Key: CB-638
> URL: https://issues.apache.org/jira/browse/CB-638
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android
> Reporter: Lee Crossley
> Assignee: Andrew Grieve
> Priority: Critical
> Labels: 2.1.0
>
> Doing many native callbacks (such as writing files) has a significant
> overhead.
> Trigger.io's native bridge is more than 5 times faster than Cordova (on
> Android).
> http://trigger.io/cross-platform-application-development-blog/wp-content/uploads/2012/02/chart_1-21.png
> I'd love to see similar performance stats in Cordova.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira