• 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] fix leaks

Status
Not open for further replies.
Level 20
Joined
Aug 13, 2013
Messages
1,696
Alright, the main problem of the lag here is not just because of memory leaks... but also because of a very poor triggering.
Even though I don't understand the language, kindly reconstruct your triggers inside the "Habilidades" folders. They contain a
lot of inefficient things that you should be aware and consider those to be taken care of. There are lots of timers running in the
background even it's not needed to. You can know which scripts are problematic there by disabling all the triggers that contain
an intensive periodic event inside the mentioned folders. After that kindly enable one by one, testing it per se. You'll just notice.

It's not that easy to solve, it requires you to have knowledge about proper triggering. (Use T&S for this kind of problems)
I can only give you an advice of reading tutorials here Trigger (GUI) Editor Tutorials.
They'll definitely help you improve. Remember, memory leaks aren't the only cause of performance problems.
 
Level 24
Joined
Jun 26, 2020
Messages
1,915
Alright, the main problem of the lag here is not just because of memory leaks... but also because of a very poor triggering.
Even though I don't understand the language, kindly reconstruct your triggers inside the "Habilidades" folders. They contain a
lot of inefficient things that you should be aware and consider those to be taken care of. There are lots of timers running in the
background even it's not needed to. You can know which scripts are problematic there by disabling all the triggers that contain
an intensive periodic event inside the mentioned folders. After that kindly enable one by one, testing it per se. You'll just notice.

It's not that easy to solve, it requires you to have knowledge about proper triggering. (Use T&S for this kind of problems)
I can only give you an advice of reading tutorials here Trigger (GUI) Editor Tutorials.
They'll definitely help you improve. Remember, memory leaks aren't the only cause of performance problems.
Well thanks, I will fix that.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
I believe the usage of periodic events and unit groups inside your scripts are the main reasons of performance lost.
I saw some 0.00 intervals of timers, and unit groups that pick all units in the playable map for intensive operations.

Note that not all the actions you use in GUI favors performance. There are cheap and expensive functions to consider.
I think you already know the basics, learn furthermore from this Things You Should Know When Using Triggers / GUI
After reading and understanding that, you can just come back here for some follow-up questions.
 
Level 24
Joined
Jun 26, 2020
Messages
1,915
I believe the usage of periodic events and unit groups inside your scripts are the main reasons of performance lost.
I saw some 0.00 intervals of timers, and unit groups that pick all units in the playable map for intensive operations.

Note that not all the actions you use in GUI favors performance. There are cheap and expensive functions to consider.
I think you already know the basics, learn furthermore from this Things You Should Know When Using Triggers / GUI
After reading and understanding that, you can just come back here for some follow-up questions.
In fact it is already solved, my map is no longer lagged, I do not know if it is because of what you told me, since they still had some memory leaks, but anyway I did what you told me so thank you.

Take here for you to try:
https://drive.google.com/file/d/1SOT4a1XUVO4DfVbbK7oj7FZvHAgdolv-/view?usp=sharing
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
I do not know if it is because of what you told me
It is. I told you the culprit is inside the "Habilidades" folders (I guess this is Abilities in English?) they contain a lot
of periodic events that were running in the background even not needed to. Initially disabling them alleviates the
lag because they're not running simultaneously. They're also in conjunction with expensive checks like unit group
count checking in GUI which is an expensive function too. ;)
since they still had some memory leaks
Remember, memory leaks aren't the only cause of performance problems.
but anyway I did what you told me so thank you.
That's alright. However, even though this thread can be closed now, it doesn't mean you'll just skip acknowledging
the tutorial I've linked above. There's nothing wrong to improve yourself, and improvement takes time. Good luck.
 
Level 24
Joined
Jun 26, 2020
Messages
1,915
It is. I told you the culprit is inside the "Habilidades" folders (I guess this is Abilities in English?) they contain a lot
of periodic events that were running in the background even not needed to. Initially disabling them alleviates the
lag because they're not running simultaneously. They're also in conjunction with expensive checks like unit group
count checking in GUI which is an expensive function too. ;)



That's alright. However, even though this thread can be closed now, it doesn't mean you'll just skip acknowledging
the tutorial I've linked above. There's nothing wrong to improve yourself, and improvement takes time. Good luck.
Ok thanks a lot and I will see that link.
 
Status
Not open for further replies.
Top