View Single Post
Old 10-12-2011, 08:43 PM   #11
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,190

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Bribe
Anitarf, if you were keeping up with what the wc3 community is building (I guess you won't see much action on this specific site) you wouldn't have even asked me to cough up some maps or systems.
Bribe, if you were really interested in getting this approved you wouldn't be pontificating pointlessly like that. You're just making it seem like you can't come up with any convincing examples.

Quote:
How much RAM saving would it take to convince you of the value? Probably none at all based on your replies.
There certainly is an amount that would make implementing an extra library worthwhile on its own, but I'm pretty certain your library doesn't come close to reaching it. Early heavily triggered maps had many leaks and that did start to affect performance after a while, so there is utility in reducing the handle count if it can be done on that scale, however we are talking about thousands if not tens of thousands of handles here.

Quote:
If you want to talk about cost of implementation well it's the difference between typing this:

Collapse JASS:
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
call TriggerAddAction(t, function OnDeath)
set t = null

Collapse JASS:
call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_DEATH, function OnDeath)

I'd say the cost of implementing this is in the negatives, meaning it saves time. Unless you are repairing an existing map, then you can enjoy the benefit of saving lots of bytes of text to keep the map file size down. Which is another argument all in itself.
That's not a particularly fair comparison. The fourth line in the first example is not really needed, while the second example omits the requires RegisterPlayerUnitEvent that needs to be typed in a different place, not to mention that autocomplete helps you type most of the first example anyway. Besides, according to your earlier post, users would need to type something more like this:
Collapse JASS:
static if LIBRARY_RegisterPlayerUnitEvent then
    call RegisterPlayerUnitEvent(EVENT_PLAYER_UNIT_DEATH, function OnDeath)
else
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_DEATH)
    call TriggerAddAction(t, function OnDeath)
endif
__________________
Anitarf is offline   Reply With Quote