incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-638) Slow native bridge (especially android)
Date Thu, 13 Sep 2012 20:43:08 GMT

    [ https://issues.apache.org/jira/browse/CB-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13455257#comment-13455257
] 

Andrew Grieve commented on CB-638:
----------------------------------

Okay, tried out your jasmine-based tester on my phone and got numbers similar to yours. Biggest
difference is that you should set useSetTimeout to false since that is relevant only on iOS
where the synchronous call goes from Native->JS (the setTimeout prevents passing JS->Native
messages as a return value to this sync native->js call). 

You should also reset the js->native bridge modes in reset() since that does affect how
online-events and polling query for messages.

The prompt js->native one is way off. The logs suggest the test is being started before
onPageFinished, so that's likely the cause.

The HANGING_GET mode is also off. I added stack trace printing to popAndEncode(), and it appears
that it is using PROMPT to send the message back to JS. I'm not exactly sure why yet, but
it seems to be hitting an optimization I added where any exec() will fetch down pending native->js
message from prior calls.

Last thing - Found this line: "Should work with load_url (not on emulator)". Not sure why
it wouldn't work on the emulator though... Did you mean that to be for JS_OBJECT and the 2.3
emulator?


                
> 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

Mime
View raw message