Text Field Performance and cache issues

Hell OpenFL devs, I’ve been working on an Infinite scroll solution for Mobile for a few weeks now.
I’ve tried just about everything to update text reasonably fast.

So First Changing the text of a Cachedbitmap does nothing.
moving non cachedbitmap text fields is not possible performance wise for more then 2-3 text fields.
Text inside a Cachedbitmap display object container is the only workaround I’ve found that works somewhat well.

Keep in mind I’ve set mouse enabled, tab enabled and selectable to false. and word wrap true. Also have a default text format.

So my questions are as Followed.

  • Would Static Text be a better route to go and if so how do I use it?
  • Possible way to async create the bitmap data of a textfield?
  • Embed fonts vs non which one has better performance.
  • Possible in anyway to draw TextField via GPU
  • Way to call for a re draw of the TextField.

Thanks for reading.

Changing a cacheAsBitmap object should break the cache. If not, let’s get a small test case so we can fix that.

StaticText comes from SWF assets, it uses a vector font (that’s what “embedded” means in Flash Player) and draws each letter using the vector graphics API. I’m not sure that would be faster. It’s also not expected to change.

Both vector graphics and TextField amount to a software render to a texture, at the moment, then GL renders that on-screen. Unless text is being redrawn constantly, I believe the performance would be the same after the draw is done. That would be worth checking.

Lastly, there was some internal work that we needed to do to prepare for accurate text layout data, required for doing a full OpenGL text render. Now that’s ready, the main question is how we would handle a font’s texture, render all glyphs at once, glyphs as requested, so on. Then a Tilemap-based renderer could be done

1 Like