Start a new topic
Solved

Issues with HtmlDrawable

 

 Hello !


I'm currently experiencing some issues with HtmlDrawable.

Here's my code (simplified) :

 

{
...
this.myHtmlDrawable = new AR.HtmlDrawable({html: "<div><p>" + myVar + "</p></div>}, varWidth, varOptions);
this.myGeoObject.drawables.addCamDrawable(this.myHtmlDrawable);

...
}
...
updateMyVar = function(myNewVar) {
    this.myHtmlDrawable.html = "<div><p>" + myNewVar + "</p></div>";
}

 

 

It works prefectly when i create the HtmlDrawable but when I try to update it, it's very slow and I get the following message in my console for each update :


 

W/cr_AxContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
W/cr_ScreenOrientation: Removing an inexistent observer!

 

Moreover, after about 6-7min with one update per second, the whole app freezes.


I have seen this post : Performance with HtmlDrawable where you say that they induce low performance but this is a very light html here and it's not just performance issue since it freezes the app.

Am I missing an important point or are HtmlDrawable just un-usable (or at least "un-updatable") ?


thanks,

Vivien


PS : I know I could use a Label instead but I'd prefer to have more custom options (chose a specific font for example...)


Hi Vivien,


In my test i updated the HTMLDrawable once every second with a counter like in your snippets, after 15 minutes the app still ran without any issues. 


Is it happening only on one device or on several devices?

What device(s) are you using?

What is the android version of your device(s)?

What Wikitude SDK version are you using?


Please send me a minimal version of your AR scene where your issues are happening.


Best Regards,

Alex

Hi Alex
thanks for your answer,

I'm currently using a NVidia Shield K1 tablet with Android 7.0 and Wikitude 6.1.
Unfortunately, I can't test my app on another device but this one seemed to have some pretty decent specs.

In my scene, I'm displaying 3 GeoObject each including 2 models (45Ko and 370Ko), 2 ImageDrawables (2.5Ko and 4.9Ko) and 2 HtmlDrawable. Most of those drawables are updated each second.

by "cleaning" the code to get the minimal version, I noticed the app seemed to run a bit faster but it still freezes after some time (I got now ~20 min)
(running in debug mode on android 2.2.3)

Also, is it possible to use a buffer to avoid the HtmlDrawable to flicker when updating ?

 

 and here are my source files

zip

Hi Vivien,


there was an issue in the SDK which caused a very bad performance and the flickering you described when setting the content of a HtmlDrawable.

This issue is fixed and will be included in the next release. I can send you a build with this fix if required but bear in mind that this will be an untested version of the SDK and may contain other issues.

Even with this fix the performance would be better if you were using labels.


Best Regards,

Alex

Hi Alex,

I am indeed currently using Labels and it works well but in the end I will display around 10 Labels per GeoObject and I thought it would be easier (and "cleaner") to use a single HtmlDrawable to gather them. Plus the HtmlDrawable would allow more customisation.

Thanks for your time anyway, I'll keep using Labels for now.
Would you have maybe a date for the next release ?


Sincerly,

Vivien

 

Hi Vivien,


unfortunately I cant give you any details about the date of the next release yet. 


Best Regards,

Alex


Login or Signup to post a comment