feathersui / feathersui-starling

User interface components for Starling Framework and Adobe AIR
https://feathersui.com/learn/as3-starling/
Other
914 stars 386 forks source link

BitmapFontTextRenderer.measureTextInternal() method allocate strings #1724

Closed hardcoremore closed 5 years ago

hardcoremore commented 6 years ago

https://github.com/BowlerHatLLC/feathers/blob/ab92e9ca8a0598626a7e47d8a415d3b8170fffa4/source/feathers/controls/text/BitmapFontTextRenderer.as#L1363

Hi Josh,

There is something in measureTextInternal method that is allocating strings. It would be small optimisation but could you possible check out what could be allocating strings in there and if any optimisation is possible.

Take a look at the Adobe Scout profile:

https://ibb.co/huo5t8

This is tested on Desktop PC.

Thanks,

Caslav

joshtynjala commented 6 years ago

It may not be possible to avoid this String allocation, but I have a couple of ideas that I can try.