Start a new topic

addToJavaScriptQueue method latency

Hi, I am trying to pass the tracking data at target recognition moment to a customized js renderer and for this purpose as it is suggested in Wikitude doc I used the addToJavaScriptQueue method. The problem is that apparently there is a 40 - 60 milliseconds delay  between this call and calling my rendereing function and this adds one frame delay to the scene. Is there any way to implement a function that could pass the data right away ? 
SDK version, 8.3.  Running code on windows 10 (android studio) and lunching the app on Samsung C7. There is no usage of other extensions such as 
Cordova, Xamarin. 

1 person has this problem

Hi Mehrdad,

When the addToJavaScriptQueue method is called, the data you sent is enqueued and evaluated in the upcoming frame. It should not take that long, but could you do some time checks to confirm how long is a frame in milliseconds in your device?



Hi Aitor,
I already did, I attached the log report and the code here you can take a look. In between the marker detection and rendering the current camera frame, the new camera frame and the new marker detection for happen ! 

(239 KB)


As it is obvious in the logs, each frame lasts 32 ms! is there any way to call the rendering function within the current frame and not to wait for the upcoming frame? 

Thanks Mehrdad

Login or Signup to post a comment