• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Solved] Map Leaking, can't find issue.

Status
Not open for further replies.
Level 3
Joined
Sep 26, 2012
Messages
39
Map is leaking progressively. As the game goes on, my fps goes down, the game feels choppy and when I leave the game, it takes a unusually long time to exit. I don't have much rams, but still, that's a sign of leaking, no?

I have went through several guides so please do not refer me to one if you won't take a look. I am really sorry for asking for leak help but I have spent several hours trying to figure out what's wrong and it looks like I am not capable of figuring it out.

If someone could find out what's wrong, I would forever be thankful. I have learned what leaks were and how to fix them after starting the map, so I've only corrected the triggers that aren't abilities so far.

In the situation where my FPS goes down, I am not using any abilities, it is progressive and gets worse as the game goes on.

All the parts that I havn't cleaned yet are ''Unit starts the effect of an ability, ability = to X'' Since I am not using abilities, I figured these couldn't be the problem so I have focused my efforts on other triggers. Correct me if I am wrong.
 
Last edited:
Level 3
Joined
Sep 26, 2012
Messages
39
Hi, most people here will pass up a post if there's an attached map and a description of leaking.

Can you post the triggers here that have (Time - Periodic) events?

Check this out - http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

Definitely

Triggers with periodic events that are initially enabled/need to be turned on during game are:

This one is shut down when all players selected their skill set:
  • Ready System
    • Events
      • Time - Every 0.30 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in ReadyCheckGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) is in ReadyPlayers) Equal to True
            • Then - Actions
              • Leaderboard - Change the color of the label for (Picked player) in ReadySystem to (0.00%, 100.00%, 0.00%) with 0.00% transparency
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of players in ReadyPlayers) Equal to PlayerCount
        • Then - Actions
          • Leaderboard - Destroy ReadySystem
          • Trigger - Turn on Periodic Gold <gen>
          • Trigger - Turn on Game Clock <gen>
          • Trigger - Run Damaging Lava <gen> (checking conditions)
          • Trigger - Run Multiboard <gen> (checking conditions)
          • Trigger - Turn off (This trigger)
        • Else - Actions
This one runs from start:
  • Game Clock
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Set SecondsCount = (SecondsCount + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SecondsCount Equal to 60
        • Then - Actions
          • Set SecondsCount = 0
          • Set MinutesCount = (MinutesCount + 1)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MinutesCount Equal to 60
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • BoardHoursInteger Not equal to 1
                • Then - Actions
                  • Set BoardHoursInteger = 1
                • Else - Actions
              • Set MinutesCount = 0
              • Set HoursCount = (HoursCount + 1)
            • Else - Actions
        • Else - Actions
      • -------- Strings --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • SecondsCount Less than 10
        • Then - Actions
          • Set SecondsString = (0 + (String(SecondsCount)))
        • Else - Actions
          • Set SecondsString = (String(SecondsCount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MinutesCount Less than 10
        • Then - Actions
          • Set MinutesString = (0 + (String(MinutesCount)))
        • Else - Actions
          • Set MinutesString = (String(MinutesCount))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HoursCount Less than 10
        • Then - Actions
          • Set HoursString = (0 + (String(HoursCount)))
        • Else - Actions
          • Set HoursString = (String(HoursCount))
      • Set GameClockString = (HoursString + (: + (MinutesString + (: + SecondsString))))
      • Set MiniClockString = (MinutesString + (: + SecondsString))
This one runs from early on:
  • Multiboard Refresher
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • BoardHoursInteger Equal to 0
        • Then - Actions
          • Multiboard - Change the title of MultiBoard to MiniClockString
        • Else - Actions
          • Multiboard - Change the title of MultiBoard to GameClockString
      • -------- Gold --------
      • Multiboard - Set the text for MultiBoard item in column 2, row 2 to (|cFFFFD700 + ((String((Player 1 (Red) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 3 to (|cFFFFD700 + ((String((Player 2 (Blue) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 4 to (|cFFFFD700 + ((String((Player 3 (Teal) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 5 to (|cFFFFD700 + ((String((Player 4 (Purple) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 6 to (|cFFFFD700 + ((String((Player 5 (Yellow) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 7 to (|cFFFFD700 + ((String((Player 6 (Orange) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 8 to (|cFFFFD700 + ((String((Player 7 (Green) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 9 to (|cFFFFD700 + ((String((Player 8 (Pink) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 10 to (|cFFFFD700 + ((String((Player 9 (Gray) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 11 to (|cFFFFD700 + ((String((Player 10 (Light Blue) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 12 to (|cFFFFD700 + ((String((Player 11 (Dark Green) Current gold))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 2, row 13 to (|cFFFFD700 + ((String((Player 12 (Brown) Current gold))) + |r))
      • -------- HKs --------
      • Multiboard - Set the text for MultiBoard item in column 3, row 2 to (|cFFFFD700 + ((String(RedKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 3 to (|cFFFFD700 + ((String(BlueKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 4 to (|cFFFFD700 + ((String(TealKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 5 to (|cFFFFD700 + ((String(PurpleKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 6 to (|cFFFFD700 + ((String(YellowKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 7 to (|cFFFFD700 + ((String(OrangeKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 8 to (|cFFFFD700 + ((String(GreenKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 9 to (|cFFFFD700 + ((String(PinkKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 10 to (|cFFFFD700 + ((String(GrayKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 11 to (|cFFFFD700 + ((String(LightBlueKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 12 to (|cFFFFD700 + ((String(DarkGreenKills)) + |r))
      • Multiboard - Set the text for MultiBoard item in column 3, row 13 to (|cFFFFD700 + ((String(BrownKills)) + |r))
      • -------- Deaths --------
      • Multiboard - Set the text for MultiBoard item in column 4, row 2 to (|cFFFFD700 + ((String(HeroDeathCount[1])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 3 to (|cFFFFD700 + ((String(HeroDeathCount[2])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 4 to (|cFFFFD700 + ((String(HeroDeathCount[3])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 5 to (|cFFFFD700 + ((String(HeroDeathCount[4])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 6 to (|cFFFFD700 + ((String(HeroDeathCount[5])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 7 to (|cFFFFD700 + ((String(HeroDeathCount[6])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 8 to (|cFFFFD700 + ((String(HeroDeathCount[7])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 9 to (|cFFFFD700 + ((String(HeroDeathCount[8])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 10 to (|cFFFFD700 + ((String(HeroDeathCount[9])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 11 to (|cFFFFD700 + ((String(HeroDeathCount[10])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 12 to (|cFFFFD700 + ((String(HeroDeathCount[11])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 4, row 13 to (|cFFFFD700 + ((String(HeroDeathCount[12])) + |r))
      • -------- UKs --------
      • Multiboard - Set the text for MultiBoard item in column 5, row 2 to (|cFFFFD700 + ((String((Player 1 (Red) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 3 to (|cFFFFD700 + ((String((Player 2 (Blue) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 4 to (|cFFFFD700 + ((String((Player 3 (Teal) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 5 to (|cFFFFD700 + ((String((Player 4 (Purple) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 6 to (|cFFFFD700 + ((String((Player 5 (Yellow) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 7 to (|cFFFFD700 + ((String((Player 6 (Orange) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 8 to (|cFFFFD700 + ((String((Player 7 (Green) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 9 to (|cFFFFD700 + ((String((Player 8 (Pink) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 10 to (|cFFFFD700 + ((String((Player 9 (Gray) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 11 to (|cFFFFD700 + ((String((Player 10 (Light Blue) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 12 to (|cFFFFD700 + ((String((Player 11 (Dark Green) Current lumber))) + |r))
      • Multiboard - Set the text for MultiBoard item in column 5, row 13 to (|cFFFFD700 + ((String((Player 12 (Brown) Current lumber))) + |r))
      • -------- Denies --------
      • Multiboard - Set the text for MultiBoard item in column 6, row 2 to (|cFFFFD700 + ((String(DeniesCount[1])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 3 to (|cFFFFD700 + ((String(DeniesCount[2])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 4 to (|cFFFFD700 + ((String(DeniesCount[3])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 5 to (|cFFFFD700 + ((String(DeniesCount[4])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 6 to (|cFFFFD700 + ((String(DeniesCount[5])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 7 to (|cFFFFD700 + ((String(DeniesCount[6])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 8 to (|cFFFFD700 + ((String(DeniesCount[7])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 9 to (|cFFFFD700 + ((String(DeniesCount[8])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 10 to (|cFFFFD700 + ((String(DeniesCount[9])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 11 to (|cFFFFD700 + ((String(DeniesCount[10])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 12 to (|cFFFFD700 + ((String(DeniesCount[11])) + |r))
      • Multiboard - Set the text for MultiBoard item in column 6, row 13 to (|cFFFFD700 + ((String(DeniesCount[12])) + |r))
  • Tree Recreation
    • Events
      • Time - Every 60.00 seconds of game time
    • Conditions
    • Actions
      • Wait 30.00 seconds
      • Destructible - Pick every destructible in (Playable map area) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Destructible-type of (Picked destructible)) Not equal to Stone Wall (Horizontal-Edited)
              • (Destructible-type of (Picked destructible)) Not equal to Stone Wall (Vertical-Edited)
            • Then - Actions
              • Destructible - Resurrect (Picked destructible) with (Max life of (Picked destructible)) life and Hide birth animation
            • Else - Actions
  • Periodic Gold
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Player - Add 1 to (Picked player) Current gold)

JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Turn_On_Spawns_Actions takes nothing returns nothing
    call TriggerRegisterTimerEventPeriodic( gg_trg_Conditional_Spawning, 30.00 )
endfunction

//===========================================================================
function InitTrig_Turn_On_Spawns takes nothing returns nothing
    set gg_trg_Turn_On_Spawns = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Turn_On_Spawns, 15.00 )
    call TriggerAddAction( gg_trg_Turn_On_Spawns, function Trig_Turn_On_Spawns_Actions )
endfunction

A couple of these, all using the same lines though:
  • Red Creeps 1
    • Events
      • Time - Every 90.00 seconds of game time
    • Conditions
      • (Number of units in (Units in Red Creeps 1 <gen> owned by Neutral Hostile)) Equal to 0
    • Actions
      • Set CreepTempPoint1 = (Center of Red Creeps 1 <gen>)
      • Unit - Create 3 Mud Golem (Edited) for Neutral Hostile at CreepTempPoint1 facing 180.00 degrees
      • Set CreepsTempGroup[1] = (Units in Red Creeps 1 <gen> matching ((Owner of (Matching unit)) Equal to Neutral Hostile))
      • Unit Group - Pick every unit in CreepsTempGroup[1] and do (Unit - Set (Picked unit) acquisition range to 200.00)
      • Custom script: call RemoveLocation (udg_CreepTempPoint1)
      • Custom script: call DestroyGroup (udg_CreepsTempGroup[1])
  • Damaging Lava Loop
    • Events
      • Time - Every 0.20 seconds of game time
    • Conditions
    • Actions
      • Set DamagingLavaTempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in DamagingLavaTempGroup and do (Actions)
        • Loop - Actions
          • Set DamagingLavaTempLoc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Picked unit)) Not equal to Neutral Hostile
              • (Terrain type at DamagingLavaTempLoc) Equal to Dungeon - Lava Cracks
            • Then - Actions
              • Unit - Cause LavaDummy to damage (Picked unit), dealing 25.00 damage of attack type Chaos and damage type Universal
              • Unit Group - Remove all units from DamagingLavaTempGroup
            • Else - Actions
      • Custom script: call RemoveLocation (udg_DamagingLavaTempLoc)
      • Custom script: call DestroyGroup (udg_DamagingLavaTempGroup)
  • Lavaburst Lava Damage
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set LavaburstDamageTempGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in LavaburstDamageTempGroup and do (Actions)
        • Loop - Actions
          • Set LavaburstLavaPickedTempLoc = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) belongs to an enemy of (Owner of LavaburstCaster)) Equal to True
              • ((Picked unit) is A structure) Equal to False
              • ((Picked unit) is Magic Immune) Equal to False
              • ((Picked unit) is Mechanical) Equal to False
              • (Owner of (Picked unit)) Not equal to Neutral Passive
              • (Terrain type at LavaburstLavaPickedTempLoc) Equal to Dungeon - Lava
            • Then - Actions
              • Unit - Cause LavaburstLavaDamageDummy to damage (Picked unit), dealing 8.00 damage of attack type Chaos and damage type Universal
            • Else - Actions
      • Unit Group - Remove all units from LavaburstDamageTempGroup
      • Custom script: call DestroyGroup (udg_LavaburstDamageTempGroup)
      • Custom script: call RemoveLocation (udg_LavaburstLavaPickedTempLoc)
  • Add Lavaburst Detonator
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Set LavaburstDetoTempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in LavaburstDetoTempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Lavaburst for (Picked unit)) Greater than or equal to 1
              • (Level of Lavaburst Detonator Detonator for (Picked unit)) Less than 1
            • Then - Actions
              • Unit - Add Lavaburst Detonator Detonator to (Picked unit)
            • Else - Actions
      • Unit Group - Remove all units from LavaburstDetoTempGroup
      • Custom script: call DestroyGroup (udg_LavaburstDetoTempGroup)
  • Add Lucent Beam Detonator
    • Events
      • Time - Every 0.40 seconds of game time
    • Conditions
    • Actions
      • Set LucentBeamDetoTempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in LucentBeamDetoTempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Lucent Beam Detonator for (Picked unit)) Less than 1
              • (Level of Lucent Beam for (Picked unit)) Greater than or equal to 1
            • Then - Actions
              • Unit - Add Lucent Beam Detonator to (Picked unit)
            • Else - Actions
      • Unit Group - Remove all units from LucentBeamDetoTempGroup
      • Custom script: call DestroyGroup (udg_LucentBeamDetoTempGroup)
  • Soulfire Caster
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Set SoulfireSkillTempGroup = (Units in (Playable map area) matching (((Matching unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in SoulfireSkillTempGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Soulfire for (Picked unit)) Greater than or equal to 1
            • Then - Actions
              • Set SoulfireCaster = (Picked unit)
              • Trigger - Add to Soulfire Damage <gen> the event (Unit - SoulfireCaster Takes damage)
              • Trigger - Turn off (This trigger)
            • Else - Actions
      • Unit Group - Remove all units from SoulfireSkillTempGroup
      • Custom script: call DestroyGroup (udg_SoulfireSkillTempGroup)
There's a couple more, but those are all abilities related loops, they are initially off and are never turned on during my tests
 
Last edited:
Level 3
Joined
Sep 26, 2012
Messages
39
Same guys that usually help me ;) Thank you

I'll fix and see if it still lag after this

EDIT: Is there a way to kill strings var?
 
Level 3
Joined
Sep 26, 2012
Messages
39
Alright, thank you. Well, the map still has many leaks it seems, after clearing the unit groups and removing the clock trigger. :( help
 
in number 3 the multiboards every 1 second u create a new string i had this problem when i started out change it over to make it once and to update use other triggers tht specify the info u want then at the end of the trigger paste the piece of multiboard tht u want updated

and as for trigger 1 the ready system u can change it to timer elapsed time .30 seconds ( if it only needs to be run once which it seems like it does )
 
Level 3
Joined
Sep 26, 2012
Messages
39
In 8 and 9, you should put the "call RemoveLocation" inside the loop.

Thank you sir, owe you another one. That's it for the leaks!

in number 3 the multiboards every 1 second u create a new string i had this problem when i started out change it over to make it once and to update use other triggers tht specify the info u want then at the end of the trigger paste the piece of multiboard tht u want updated

I'm not sure I understand what you mean! My board title was a ''clock'' that was a string of 3 integers Hours:Minutes:Seconds and it's the reason I was refreshing the multiboard title every seconds. Did I understand what you meant?

About this, the topic is solved for the lag issue but I'm still wondering how to make a clock rendering gametime elapsed and make it the multiboard's title since my strings system was majorly leaking.

Should I make a new topic about this and officialize this one as solved or should I keep this one open?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
You use many columns to make the clock, say 1 column per time unit.
Since both minutes and seconds have a range of 0 to 59 this means that they will be covered by 60 unique strings in total (and it is only unique strings that cause a leak). Even hours would only start making unique strings after 60 hours game time which most sessions would have long ended by then.
 
Level 6
Joined
Nov 24, 2012
Messages
218
I have a question regarding leaks also.
My map has a multiboard that makes at least 100,000 unique strings.
Is this really bad?

If so, how does YouTD manage to save hundreds of strings for each tower stats, each tower has it's own total damage done, etc, all viewable on multiboard. That, and exp strings, all that stuff, everchanging, total damage going over 100,000,000?

Edit: Tested by making I2S string = string + 1 run 100 times per second. Handle counter going up exactly 100 every second. What to do, remove multiboard?!
 
Level 3
Joined
Sep 26, 2012
Messages
39
You use many columns to make the clock, say 1 column per time unit.
Since both minutes and seconds have a range of 0 to 59 this means that they will be covered by 60 unique strings in total (and it is only unique strings that cause a leak). Even hours would only start making unique strings after 60 hours game time which most sessions would have long ended by then.

Columns as in multiboard columns or concacenate strings? If I use 3 Concacenate strings for the time units in my mboard, is the final output saved as an unique string?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Concatination makes unique strings at every step because it returns a string. Columns act independantly of each other so you can use much shorter strings to achieve the same effect as concatination without the leaks.

My map has a multiboard that makes at least 100,000 unique strings.
Is this really bad?

If so, how does YouTD manage to save hundreds of strings for each tower stats, each tower has it's own total damage done, etc, all viewable on multiboard. That, and exp strings, all that stuff, everchanging, total damage going over 100,000,000?

Edit: Tested by making I2S string = string + 1 run 100 times per second. Handle counter going up exactly 100 every second. What to do, remove multiboard?!
I will repeat it again, any unique string that is created will exist in the string hashtable and memory until the end of the session. Make 100,000 unique strings and you will start to notice degraded string performance until the end of the session.

Simplest test is to display a counter from 0 upwards at 200 counts per second. Soon the game becomes unplayable when at the start it was fine.
 
Level 6
Joined
Nov 24, 2012
Messages
218
Ran some quick tests since I'm quite concerned with the 100,000 unique strings by end of game on my map.

war3.exe memory column on task manager -> 250k at 0 string leaks, FPS -> 30-35
war3.exe memory column on task manager -> 330k at 400,000 string leaks, FPS -> 30-35

FPS (at 0 leaks) (30-35)
FPS (at 100,000 leaks) -> (15-25, was continually dropping until I paused loop)
FPS (at 400,000 leaks) -> (0.5-2, would have dropped below 0.5 fps if I didn't pause loop)
FPS (at 400,000 leaks, loop paused) -> (30-35), I can't test further, laptop is too crappy.
Starting up loop past 400,000 is like instant lag. FPS drops from 30-35 to below 0.5 very fast.

The unique string creation itself seems to be degrading performance (when there are lots of unique strings), just having the 400,000 strings without anymore being created seems to have little/no effect on degrading performance.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
war3.exe memory column on task manager -> 250k at 0 string leaks, FPS -> 30-35
war3.exe memory column on task manager -> 330k at 400,000 string leaks, FPS -> 30-35
And how exactly is it using so little memory? Games from 1998 used more memory...

The unique string creation itself seems to be degrading performance (when there are lots of unique strings), just having the 400,000 strings without anymore being created seems to have little/no effect on degrading performance.
As I stated, the created strings are retained in the string hashtable. One can assume no hashtable bucket array resizing occurs and as such the hashtable performance starts to degrade towards O(n).
 
Status
Not open for further replies.
Top