How to reduce the steps of a template

archel

Client
Регистрация
02.05.2011
Сообщения
175
Благодарностей
22
Баллы
18
Hi

I'm trying to find ways to reduce the steps of some big templates and thus making it smaller/faster.

One way I have found is replacing the 3 counter macros (init, get value, increase) by a single java macro:

Код:
{-JS.Execute-|-
var x="{-FieldData.FieldData-|-●9●0●6●9●2●0●-|-≡2≡0≡8≡4≡5≡6≡1≡7≡6≡8≡-}";
if(x=="")
0;
else
{-FieldData.FieldData-|-●9●0●6●9●2●0●-|-≡2≡0≡8≡4≡5≡6≡1≡7≡6≡8≡-}+1;
-}
Fielddata is the java macro itself.


Though, I'm still looking for other ways so if anybody knows some, you may always share it here. :-)
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
hmmm...this is not something i would use to reduce size. Counters are something i dont wana reduce, but need it safe to play.

There is enough other things you can reduce and merge more macros into one. You can make get string, split string...all in one macros branch for some stuff and things like that...
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Plus, using JS in Zenno has already proven to be memory intensive. Hopefully in V4 they will get it to where the memory is dumped and more JS can be used.
 

archel

Client
Регистрация
02.05.2011
Сообщения
175
Благодарностей
22
Баллы
18
Well, the thing is I had some templates which always got the bug where steps disappear, most likely because there are too much steps.
Sometimes I also need 5 or more logical operations behind eachother and since you can do this in one step with java too, I prefer java.

Although I didn't know that using java was memory intensive...does the same count for the global storage macro? Cause just started to use that too.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)