[ https://issues.apache.org/jira/browse/CB-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456117#comment-13456117 ]
Andrew Grieve commented on CB-638: ---------------------------------- That turned out to be it. I added a flag to disable the optimization and HANGING_GET got a lot slower. I tried to get your benchmark to be more accurate by disabling setTimeout and adding in delays, but it's still not quite giving the same results as the manual page I created. I also played with using benchmark.js to measure the times, but it gives ops/second that are far below what the manual test page shows. I suspect it's from it's use of setTimeout when using deferred tests, but I found the source code of benchmark.js to be quite confusing, so gave up on it. In case you're interested, I pushed it to my github as a separate entry in the auto-tests page. I'm not planning on committing it though, as I think the manual test page does a better job at measuring. https://github.com/agrieve/incubator-cordova-mobile-spec/tree/bench > 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 > Fix For: 2.2.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