Better HN
topnewbestaskshowjobs
Log inSign up

restelettedo

2 karma · joined Jul 18, 2012 (14y ago) · 1 submissions

Submissions

comment 13y ago · link · parent

stringByEvaluatingJavaScriptFromString calls are still capped, at 10MB and 10 seconds - that might be up from the 5 seconds you experienced.

Our approach to that is two-fold:

We try not to send big chunks of data through the bridge (we pass file around by reference, for example): in our initial prototypes a couple of years ago we passed image data base64 encoded and that definitely didn't scale!

Secondly, stringByEvaluatingJavaScriptFromString just gets data into the JS engine's scope - the processing of those received messages is done in a separate thread of execution. By that I mean started by an event, not true multi-threading of course!