[Laszlo-dev] For Review: Change change.qauDneSy9.txt Summary: Make Profiler work in DHTML
jgrandy at openlaszlo.org
Tue Jun 27 21:40:26 EDT 2006
On Jun 27, 2006, at 6:27 PM, P T Withington wrote:
> On 2006-06-27, at 18:42 EDT, Jim Grandy wrote:
>> On Jun 27, 2006, at 1:50 PM, P T Withington wrote:
>>> LzIdle: Don't profile LzIdle.update. Optimize to only send
>>> if clients.
>> Could/should this part of the change go back to trunk? I'm about
>> to propose a change to trunk to use setInterval (flash6-8
>> compatible) instead of idle polling for LzTimer, and your
>> optimization looks complementary...
> Well, there is probably a better solution for both runtimes: to not
> poll if no one is listening for the idle event. But that's beyond
> the scope of my change. As you are fond of saying: file a bug?
So your change doesn't make this optimization for DHTML? It looked
like it did.
As for SWF. After a bit of spelunking, it looks like we embed a small
movieclip in our swf builds that drives the onidle hook. I'm looking
> // 3. movieclip called "frameupdate" which has two
> frames and some clip actions:
> movieClip = new Script(2);
> block = actionBlock("_root.LzIdle.onidle.sendEvent
> ( getTimer() );");
> // NOTE: depth=2 required in order for this to work in
> swf6 for some
> // unknown reason!
> inst = frame.addInstance(movieClip, 2, null, null,
Does this clip just spin all the time? If so, that might account for
some of the extra CPU usage we see with OL apps.
I have no idea how we'd fix this, but I'll file a bug as you suggest,
if no one pipes up and explains that things are already optimal.
More information about the Laszlo-dev