[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 31 Jul 2010 12:54:48 +0200
Doing some profiling on winterbells (orisinal morning sunshine - SWF6)
I found the most time-consuming call is being string_table::noCase
mostly called by getProperty in turn called by get_prototype (looking up
"__proto__"). This accounts for 11.27% of time, followed by 8.83 of getProperty,
7.20 of map lookup and finally 6.5% of rendering.
For the first time I then see AS processing taking more than rendering.
The call to noCase seek for a match in a table of caseful-to-caseless
string_table::key values (longs) in order to tell if the input is already
lower-case or not (can Ben confirm this?).
This happens for any movie whose SWF version is < 7.
In this specific case the _caseTable "only" contains 275 entries.
Inlining the noCase implementation doesn't help much, just moves the time
to the caller (getProperty).
The process to find a property currently has these steps:
1. Find the 'key' corresponding to a name (long from string)
2. Find the lower-case 'key' corresponding to a 'key' (long from long)
3. Find the Property corresponding to the lower-case 'key' (Property*
That makes 3 containers lookups per property lookup, and multiply that
by the number of parents in a hierarchy chain (__proto__).
How can we improve it ?
Was this tested to be faster than looking for the string directly
using a case-insensitive index ?
() Free GIS & Flash consultant/developer
- [Gnash-dev] string_table::noCase,