Total Handle on a Map

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Is it possible for a mapping to create > 8190 handles in a gameplay?

I know it is quite a nonsense question, but I wanted to know it...

Edit - Mods Please Change my Title. Typo on it. :p
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Lag? I don't know it directly, but I'll assume it would be lag like hell when 8190 handles is created?
 

Cohadar

master of fugue
Reaction score
209
Actually lags starts to get noticable only after 100.000 handles.

Just for the record, Pyramidal Defence has no leaks and the maximum of handles I saw it generate was 2400.

Perhaps installing a leaderboard that shows current handle number in a map would be a good idea.

You can find one in a sandbox map in my first post in Pyramidal Defence thread.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>Just for the record, Pyramidal Defence has no leaks and the maximum of handles I saw it generate was 2400.
How would you track when a handle is created? But nevermind, you could manually create handle and not destroy it and update the leaderboard. Just track when will the map begin to lag and what happens when it reach 8190... I'll do the test.

>>You can find one in a sandbox map in my first post in Pyramidal Defence thread.
What's that?
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
This is not getting me anywere, why is this piece of code is not giving me a bit of lag even the value is raise until 500k.
udg_sniper is a prefix unit placed in the map.
JASS:
scope HandleMadeMapLag

globals
    private leaderboard HandProg 
    private timer t = CreateTimer()
    private integer HandNum = 0
endglobals

private function tAct takes nothing returns nothing
//! textmacro HandleC takes Name
local unit u$Name$ = udg_sniper
//! endtextmacro
//! runtextmacro HandleC("1")
//! runtextmacro HandleC("2")
//! runtextmacro HandleC("3")
//! runtextmacro HandleC("4")
//! runtextmacro HandleC("5")
//! runtextmacro HandleC("6")
//! runtextmacro HandleC("7")
//! runtextmacro HandleC("8")
//! runtextmacro HandleC("9")
//! runtextmacro HandleC("10")

set HandNum = HandNum + 1
call LeaderboardSetItemValue(HandProg,LeaderboardGetPlayerIndex(HandProg, Player(0)),HandNum)
call LeaderboardResizeBJ(HandProg)
endfunction

private function Trig_Test_How_much_Handle_Made_Map_lag_Actions takes nothing returns nothing
call TimerStart(t,.0001,true,function tAct)
set HandProg = CreateLeaderboard()
call LeaderboardSetLabel(HandProg,"Handle Creating Progress")
call LeaderboardResizeBJ(HandProg)
call PlayerSetLeaderboard(Player(0),HandProg)
call LeaderboardDisplay(HandProg,true)
call LeaderboardSetStyle(HandProg,true,true,true,true)
call LeaderboardAddItem(HandProg,"Handle Created", HandNum, Player(0))
endfunction

//===========================================================================
function InitTrig_Test_HandleLag takes nothing returns nothing
    set gg_trg_Test_HandleLag = CreateTrigger()
    call TriggerAddAction( gg_trg_Test_HandleLag, function Trig_Test_How_much_Handle_Made_Map_lag_Actions )
    call TriggerRegisterTimerEvent(gg_trg_Test_HandleLag,1,false)
endfunction

endscope
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
Bump, I really need help on this.
 

Builder Bob

Live free or don't
Reaction score
249
From what I can see you're setting a lot of local variables refer to a pre placed unit without nulling them at the end. Doesn't this just increase the reference counter to the handle udg_sniper, and not actually making any new handles?

Maybe there's something I'm missing though.
 

gref

New Member
Reaction score
33
Why not just Create a timer/group/unit etc each timer.
The handle that's not being nulled for the unit should be comparable in size to an integer or float, so it is unlikely to cause lag for a lonnnnnng time.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>Aren't you trying to test the limit of handles on the map?
Probably half right....
I wanted to test in what number of handles will starting causing lag.

>>Why not just Create a timer/group/unit etc each timer.
That creates leak... not handle...
 

Cohadar

master of fugue
Reaction score
209
There already is a lag/leak test in ABC demo map.
Just type -torment
 

SFilip

Gone but not forgotten
Reaction score
634
> I wanted to test in what number of handles will starting causing lag.
How long can a person run until he gets tired?
The answers to both depend on too many factors.
The number of handles that causes lag will be different on different PCs, different maps etc.

Lets just say that your map probably has more serious issues if the handle count exceeds 8190...
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>.Lets just say that your map probably has more serious issues if the handle count exceeds 8190...
Serious issues..?
Such as..?

>>There already is a lag/leak test in ABC demo map.
No, i don't want leak test.
 

SFilip

Gone but not forgotten
Reaction score
634
> Such as..?
Memory leaks or not nulling local variables.

> No they are not.
Do elaborate. They may not be the only thing, but creating handles without destroying them certainly increases the handle count.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
So just how to leak a handle..?
My code was a wrong method obvously..
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top