Skip to main content
November 11, 2009
Question

Extreme memory usage per character in FTE

  • November 11, 2009
  • 1 reply
  • 1609 views

I ran a few test to check memory issues. If I populate a TextElement with 100,000 characters and then do just one createTextLine I see the memory usage jump about 18 megabytes. So I create one textline, do not add it to the display list, and I see the memory increase. If I don't call createTextLine (but do everything else), then I do not see the radical increase in memory usage. I paired this down to 50,000 characters and to me it looks like somewhere on the order of 150-200 bytes is being used for the storage of each character. Just a guess but can someone shed some light on this.

Seems to be a direct correspondence between number of characters and the extreme use of memory for each character, so that is how I arrive at the approximate 150-200 bytes per character.

Since this has nothing to do with reusing textLines etc... Is this kind of issue resolved in 10.1 ?

Don

This topic has been closed for replies.

1 reply

Participating Frequently
November 12, 2009

Various FTE data structures were improved in 10.1 to reduce the per-character storage. It should be on the order of 2-10 bytes per character, I think.

Gordon Smith

Adobe Flex SDK Team

Participating Frequently
November 12, 2009

An engineer who worked on these 10.1 improvements gave me sone additional information that is worth sharing:

2-10 bytes per character is the permanent data structure that's needed to render lines. We still consume 30-120 bytes of temporary data during the creation of this structure (30 in the common case, 120 in other cases with non-default styling or circumstances). Numbers are approximative.

Gordon Smith

Adobe Flex SDK Team

November 12, 2009

Thanks for checking this out Gordon.

If I am following you correctly, then each time say the width of the container has changed, and we need to recalc all the lines, then this 30-120 bytes of temporary storage will be needed for each character ?

If that is correct, then in the 100,000 character case, each time container is resized then anywhere from 3 to 12 megabytes will be needed for temporary storage ?? yeah confused

Seems more likely you mean 30-120 bytes extra needed for whole thing, but that would not be worth mentioning... lol

Could you please clarify ?

Thanks,

Don