Hi!
I'm developing for iphone and android using phonegap. (
http://phonegap.com )
my app needs some objective-c <-> Javascript bridging to pass events
back and forth,
because i need js code and native obj-c code to act at the same time
(!) on the same touchevents/gestures.
what i found out so far is that the method of using
document.location="gap:command

arams" for executing native code from
javascript is very very slow. (e.g. my obj-c code gets called once a
second)
has anyone made any different experiences?
is there some way to speed this technique up in a serious way?
my 2nd approach is to instantiate a JS object und funcs from obj-c
with stringByEvaluatingJavaScriptFromString , push js-event data into
an JS array
and read that data back form obj-c via [self performSelector:@selector
(readJavascriptLogger) withObject:nil afterDelay:0.1] every 0.1 secs
as described here in the 1st comment:
http://drnicwilliams.com/2008/11/10/...ur-iphone-app/
this works a lot better, but still is not as fast as i would like it
to be.
does this technique has some serious drawbacks?
is there any way to boost performance here?
is there any way to generally boost JS performance on the iphone? (e.g
some dos & donts)
your help is much appreciated!
sam