Show Me Your Tree!

What does your display list look like?

While doing some work on multi-context view auto-wiring I wrote a little utility that iterates through the containers in a given display object container and builds some useful stats.

If you have a moment I would love it if you could run it against your Flex or Flash app and post the results in the comments. Please also indicate whether you ran it against a single complex component or an entire app, and whether it was Flash, Flex or Mobile.

GitHub: https://github.com/darscan/boyblack-toolkit

ZIP download: boyblack-toolkit

Usage:

trace(new DocStats(doc));

Sample output:

Display Object Container Stats

All Container Stats
Containers:             521 total
Children per container: 8 max, 1.16 avg
Depths (distance):      29 max, 18.45 avg
Unique container types: 86 total

Unfiltered Container Stats
Containers:             153 total
Children per container: 8 max, 1.69 avg
Depths (distance):      26 max, 16.98 avg
Unique container types: 65 total

Filtered (mx., spark., flash.) Container Stats
Containers:             368 total
Children per container: 8 max, 0.94 avg
Depths (distance):      29 max, 19.07 avg
Unique container types: 21 total
Posted in Code, Questions | Tagged , , , | 23 Comments
  • Tyrone_neill

    I might run that through the positions/elections grid ;)

  • http://shaun.boyblack.co.za/blog/ shaun

    That would be epic!

  • Ondina

    1. small Flex application with robotlegs

    Display Object Container Stats

     

    All Container Stats

    Containers:            
    33 total

    Children per container: 3 max, 1.12 avg

    Depths (distance):     
    12 max, 6.48 avg

    Unique container types: 15 total

     

    Unfiltered Container Stats

    Containers:            
    2 total

    Children per container: 2 max, 1.5 avg

    Depths (distance):     
    4 max, 2 avg

    Unique container types: 2 total

     

    Filtered (mx., spark., flash.) Container Stats

    Containers:            
    31 total

    Children per container: 3 max, 1.1 avg

    Depths (distance):     
    12 max, 6.77 avg

    Unique container types: 13 total

     

     

    2. same app as the first as plain as3
    project 

    Display Object Container Stats

     

    All Container Stats

    Containers:            
    18 total

    Children per container: 4 max, 1.17 avg

    Depths (distance):     
    3 max, 2.28 avg

    Unique container types: 7 total

     

    Unfiltered Container Stats

    Containers:            
    8 total

    Children per container: 4 max, 2.5 avg

    Depths (distance):     
    3 max, 1.75 avg

    Unique container types: 6 total

     

    Filtered (mx., spark., flash.) Container Stats

    Containers:            
    10 total

    Children per container: 1 max, 0.1 avg

    Depths (distance):     
    3 max, 2.7 avg

    Unique container types: 1 total

     

     

    3. Medium sized AIR application with
    robotlegs

    Display Object Container Stats

     

    All Container Stats

    Containers:            
    62 total

    Children per container: 5 max, 1.16 avg

    Depths (distance):     
    12 max, 6.31 avg

    Unique container types: 19 total

     

    Unfiltered Container Stats

    Containers:            
    8 total

    Children per container: 4 max, 1.63 avg

    Depths (distance):     
    10 max, 4.88 avg

    Unique container types: 5 total

     

    Filtered (mx., spark., flash.) Container Stats

    Containers:            
    54 total

    Children per container: 5 max, 1.09 avg

    Depths (distance):     
    12 max, 6.52 avg

    Unique container types: 14 total

     

    Cheers,

    Ondina

  • http://shaun.boyblack.co.za/blog/ shaun

    Thanks Ondina, much appreciated. I edited your comment and fixed the formatting.

  • http://shaun.boyblack.co.za/blog/ shaun

    Display Object Container Stats

    All Container Stats
    Containers: 1535 total
    Children per container: 10 max, 1.17 avg
    Depths (distance): 34 max, 18.23 avg
    Unique container types: 119 total

    Unfiltered (custom) Container Stats
    Containers: 491 total
    Children per container: 10 max, 1.59 avg
    Depths (distance): 32 max, 16.77 avg
    Unique container types: 89 total

    Filtered (mx., spark., flash.) Container Stats
    Containers: 1044 total
    Children per container: 10 max, 0.98 avg
    Depths (distance): 34 max, 18.92 avg
    Unique container types: 30 total

  • http://twitter.com/StimuliTV Doug Gray

    New ITVPlayer codebase

    ########## Doc Stats (Start) ##########
    Display Object Container Stats

    All Container Stats
    Containers:             71 total
    Children per container: 10 max, 1.44 avg
    Depths (distance):      6 max, 2.99 avg
    Unique container types: 28 total

    Unfiltered Container Stats
    Containers:             31 total
    Children per container: 10 max, 2.42 avg
    Depths (distance):      4 max, 2.35 avg
    Unique container types: 26 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             40 total
    Children per container: 8 max, 0.68 avg
    Depths (distance):      6 max, 3.48 avg
    Unique container types: 2 total

    ########## Doc Stats (End) ##########

  • http://shaun.boyblack.co.za/blog/ shaun

    Awesome, thanks Doug.

  • Anonymous

    A modular AS3 robotlegs app, which has a currently loaded child swf module (also built with robotolegs).

    ———————————-
    Display Object Container Stats

    All Container Stats
    Containers:             1622 total
    Children per container: 504 max, 1.41 avg
    Depths (distance):      12 max, 7.01 avg
    Unique container types: 20 total

    Unfiltered Container Stats
    Containers:             590 total
    Children per container: 15 max, 1.21 avg
    Depths (distance):      11 max, 6.14 avg
    Unique container types: 18 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             1032 total
    Children per container: 504 max, 1.53 avg
    Depths (distance):      12 max, 7.51 avg
    Unique container types: 2 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Wow, you’ve got a clip in there with 504 children. Interesting stuff! Thanks for sharing, much appreciated.

  • Doug Mcleod

    Main window of a medium sized Air app.

    Display Object Container Stats

    All Container Stats
    Containers:             815 total
    Children per container: 10 max, 1.13 avg
    Depths (distance):      27 max, 16.79 avg
    Unique container types: 94 total

    Unfiltered Container Stats
    Containers:             198 total
    Children per container: 5 max, 1.59 avg
    Depths (distance):      25 max, 15.73 avg
    Unique container types: 57 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             617 total
    Children per container: 10 max, 0.98 avg
    Depths (distance):      27 max, 17.13 avg
    Unique container types: 37 total

  • http://twitter.com/camillereynders Camille Reynders

    ContextView of a Flex 4.0 Air app with RL

    Display Object Container Stats

    All Container Stats
    Containers:             179 total
    Children per container: 7 max, 1.23 avg
    Depths (distance):      9 max, 7.74 avg
    Unique container types: 13 total

    Unfiltered (custom) Container Stats
    Containers:             78 total
    Children per container: 5 max, 1.12 avg
    Depths (distance):      9 max, 8.05 avg
    Unique container types: 6 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             101 total
    Children per container: 7 max, 1.32 avg
    Depths (distance):      9 max, 7.5 avg
    Unique container types: 7 total

  • Arjen Wassenaar

    Flex 4.5.1 web application with RL
    ————————————–

    Display Object Container Stats

    ?All Container Stats
    Containers:             264 total
    Children per container: 51 max, 1.68 avg
    Depths (distance):      21 max, 16.06 avg
    Unique container types: 56 total

    Unfiltered (custom) Container Stats
    Containers:             22 total
    Children per container: 5 max, 2.73 avg
    Depths (distance):      16 max, 12.77 avg
    Unique container types: 12 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             242 total
    Children per container: 51 max, 1.59 avg
    Depths (distance):      21 max, 16.36 avg
    Unique container types: 44 total

    Flex 4.5.1 mobile application with RL
    —————————————–

    ?Display Object Container Stats

    All Container Stats
    Containers:             124 total
    Children per container: 12 max, 1.9 avg
    Depths (distance):      16 max, 10.36 avg
    Unique container types: 32 total

    Unfiltered (custom) Container Stats
    Containers:             19 total
    Children per container: 6 max, 1.53 avg
    Depths (distance):      14 max, 10.95 avg
    Unique container types: 7 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             105 total
    Children per container: 12 max, 1.96 avg
    Depths (distance):      16 max, 10.26 avg
    Unique container types: 25 total

    AS3 (minimalComps) mobile application with RL
    —————————————————–
    ?
    Display Object Container Stats

    All Container Stats
    Containers:             322 total
    Children per container: 17 max, 1.58 avg
    Depths (distance):      5 max, 4.27 avg
    Unique container types: 19 total

    Unfiltered (custom) Container Stats
    Containers:             232 total
    Children per container: 6 max, 1.33 avg
    Depths (distance):      5 max, 4.33 avg
    Unique container types: 18 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             90 total
    Children per container: 17 max, 2.23 avg
    Depths (distance):      5 max, 4.1 avg
    Unique container types: 1 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Thank you Doug.

  • http://shaun.boyblack.co.za/blog/ shaun

    Thanks Camille.

  • http://shaun.boyblack.co.za/blog/ shaun

    Thank you Arjen.

  • http://twitter.com/mizi_sk Tom Mizi

    ActionScript (no Flex visual components) + RL
    RTS game targetted for iOS, Android and web

    Display Object Container Stats

    All Container Stats
    Containers:             195 total
    Children per container: 69 max, 2.1 avg
    Depths (distance):      12 max, 8.13 avg
    Unique container types: 53 total

    Unfiltered (custom) Container Stats
    Containers:             158 total
    Children per container: 69 max, 2.2 avg
    Depths (distance):      12 max, 8.03 avg
    Unique container types: 51 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             37 total
    Children per container: 12 max, 1.7 avg
    Depths (distance):      12 max, 8.54 avg
    Unique container types: 2 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Nice one, thanks Tom.

  • Patrick Jamieson

    Small Flex/PureMVC app; Loads Flash content

    Small Flex 4.1/PureMVC app; Loads Flash contentDisplay Object Container StatsAll Container StatsContainers: 402 totalChildren per container: 19 max, 1.23 avgDepths (distance): 17 max, 9.33 avgUnique container types: 75 totalUnfiltered Container StatsContainers: 65 totalChildren per container: 4 max, 1.42 avgDepths (distance): 14 max, 8.68 avgUnique container types: 44 totalFiltered (mx., spark., flash.) Container StatsContainers: 337 totalChildren per container: 19 max, 1.19 avgDepths (distance): 17 max, 9.45 avgUnique container types: 31 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Thank you Patrick, much appreciated.

  • Tyrone_neill

    Display Object Container Stats

    All Container Stats
    Containers:             1517 total
    Children per container: 42 max, 1.15 avg
    Depths (distance):      28 max, 18.36 avg
    Unique container types: 150 total

    Unfiltered Container Stats
    Containers:             480 total
    Children per container: 15 max, 1.61 avg
    Depths (distance):      27 max, 17.6 avg
    Unique container types: 112 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             1037 total
    Children per container: 42 max, 0.93 avg
    Depths (distance):      28 max, 18.71 avg
    Unique container types: 38 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Wicked, thanks dude.

  • David Sagnette

    FLEX 4.5 with RL 1.5.6

    Display Object Container Stats

    All Container Stats
    Containers:             11779 total
    Children per container: 402 max, 1.32 avg
    Depths (distance):      33 max, 21.61 avg
    Unique container types: 168 total

    Unfiltered Container Stats
    Containers:             1562 total
    Children per container: 12 max, 1.35 avg
    Depths (distance):      32 max, 18.57 avg
    Unique container types: 84 total

    Filtered (mx., spark., flash.) Container Stats
    Containers:             10217 total
    Children per container: 402 max, 1.32 avg
    Depths (distance):      33 max, 22.07 avg
    Unique container types: 84 total

  • http://shaun.boyblack.co.za/blog/ shaun

    Nice one, thanks David. 11779 containers, and 1562 unfiltered.. Woah! Interesting that the max depth, even for really large projects like yours, never really exceeds 35 deep.