"mzScript & xLabel" animation - poor performance ?! Thread last updated on 2004-07-12 20:03:27

Posted by member 103440 on 2004-07-12 17:44:58

Hi!
I'm using xLabel and mzScript to move labels in some animations in my theme. But, sometimes the animation is smooth and sometimes very slow… with the same cpu resource usage at the time (low! ). I want to know a way to solve this… to force it to go smooth. I don't know where the problem is: LiteStep? xLabel? mzScript? or All?
I know it isn't cause by other programs using cpu (of courser when there is high cpu use the animation is slow!). Here is the script:

*Script bang !MoveDown
*Script exec !VarSet counter %#%{\1}%#
*Script exec !VarSet total %#%{\1}%#
*Script exec !VarAdd total %#%{\2}%#
*Script exec !LabelResizeBy DeskFldrBack 0 %#%{total}%#
*Script label start
*Script exec !execute [!LabelMoveBy #901 0 4] [!LabelRepositionBy #902 0 4 0 -4]
*Script exec !VarAdd counter -4
*Script gotoif ("%{counter}" = "0") end
*Script goto start
*Script label end
*Script exec !execute [!LabelMoveBy #901 0 %#%{\2}%#] [!LabelRepositionBy #902 0 %#%{\2}%# 0 %#-%{\2}%#]
*Script exec !VarAdd varDeskFldSizeY "%{total}"
*Script exec !VarSave varDeskFldSizeY
*Script exec !Reload
*Script exec !netreloadmodule "$DeskFolderRevID$"
*Script ~bang

The "execute line" does the animation with "!LabelMoveBy" and "!LabelRepositionBy".

I tried to start mzScript threaded but it didn't solve the problem. I want to move many labels simultaneous. If I use the internal animation bang from xLabel "!LabelMoveBy (label-name) (x) (y) [(steps) (time)]" it will move one label after another and not simultaneous. And with the internal animation bang from xLabel I don't have performance problems.

Before anyone saying me to hook the labels inside one bigger label, this can't be the solution because of the conception of my theme. The labels I am moving have already other "stuff" hooked inside and they represent separate structures (unless there is a way to hook/unhook labels on the fly?).
Maybe LsBox is the solution? I don't know. I need some features from xLabel and it is one less module to load ;)
Any help would be appreciated. Thanks!

Using:
LiteStep 0.24.7 RC 3
mzScript v0.9 Beta 12
xLabel v3.1

Posted by member 37809 on 2004-07-12 18:42:43 link

That's an odd labelname: #902 ?

Anyhow, in your !LabelRepositionBy you're resizing it?
Resizing is typically a slow operation. Tiling instead of stretching a label helps a little.

Kidnap can hook/unhook on-the-fly.

I have found that over time my animations go slow too. (it's because they start to flicker when they animate). Killing litestep and restarting it fixes it.

Posted by member 103440 on 2004-07-12 20:03:27 link

@tnl

- #902 is a label group (since this bang support groups ;) ). This is a generic bang so I can move many different labels with the same bang ;)
- Yes, I’m resizing in !LabelRepositionBy, and i noted it was slow, but anyhow there is abnormal performance variation like I told. How can I tile it?
- Kidnap... hummm. Maybe i can find a solution here!
- Restarting LiteStep... :( I was thinking that maybe reloading the module will help?!