Measure flex component creation time
Code snippet for the cases when you can't understand how long application response visually.
Usage:
- call MeasureUtil.logNextFrameTime before you are expecting complex UI creation.
- you will see traces as result:
Timer::frames 140,156,172,172
which means that next frame starts rendering only after 140 ms. But average frame interval should be about 1000 / 31 = 32 ms. Second frame occurs after 156 ms after our method call.
Code is pretty simple, checking for time pass in ENTER_FRAME.
package { import flash.events.Event;