• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

This map lag a lot!!! Help...

Status
Not open for further replies.
Level 9
Joined
Oct 11, 2009
Messages
477
Please check the map below. I used MemoryLeakHelper in this map, why do special effects leak even if I clean them? I always type debug and it shows that it leaks 15 and above special effects per second.
 

Attachments

Why would you depend on the program? Besides from conserving time, but just doing it the manual way helps you more because you also learn how to clean leaks. I'm going to edit this post after I am done checking your triggers.

Hellfire Blaze Spell :

Hellfire Blaze Start

-
  • Unit Group - Add (Casting unit) to HellfireBlazeCasters
- Don't use Casting Unit, use Triggering Unit.

Hellfire Blaze Explosion

- I dont see any obvious leaks here.

Hellfire Blaze Start Stop

- Unit Group -
  • Remove (Casting unit) from HellfireBlazeCasters
- Don't use Casting Unit, use Trigger Unit.

I don't see any obvious leaks at all, you need to change all Casting Units to Triggering Unit. I do not understand the part "Why do special effects leak even if I clean them?" I tried understanding it, but I think its the softwares problem not yours, I saw all of your special effects is destroyed after you used them.

Also, the dying unit, change it also to Triggering Unit.
 
I didn't see any heavy leaks (although you could null some variables).
Don't use MemoryLeakHelper, use your head...

And don't use every 0.01 seconds, use every 0.03 seconds (it will definitely save a lot of lag).
Another thing you can do: turn off ALL loop-triggers and only turn them on once the ability is cast.
When the ability is done, check if anyone else is casting it, if nobody is casting it, turn the loop-trigger off again.

I didn't check all triggers, and not thoroughly though, just rapidly checked most of them.
 
Special effects I shall say, when I type call DisplayLeaks() in the MemoryLeakHelper, it shows special effect leaks even if I destroy them after the special effect action like this:

  • SPECIAL EFFECT
    • Events
    • Conditions
    • Actions
      • Special Effect - Create special effect at foot of (Unit) using <SPECIAL EFFECT>
      • Special Effect - Destroy (Last created special effect)
 
Try putting the special effects to variables and then destroy them. Create special effect then, Set SpecialEffect(Variable)=Last Created Special Effect, then destroy SpecialEffect and then Custom Script call DestroyEffect (udg_SpecialEffect). Try that, hope it helps:)
 
Like this?


  • SPECIAL EFFECT
    • Events
    • Conditions
    • Actions
      • Special Effect - Create special effect at foot of (Unit) using <SPECIAL EFFECT>
      • Set VARIABLE = (Last created special effect)
      • Special Effect - Destroy (VARIABLE)
 
Sorry, was afk:) Yeah, just add a Custom Script like this:
  • Actions
    • Special Effect - Create a special effect attached to the foot of (Unit) using <SPECIAL EFFECT>
    • Set Variable = (Last created special effect)
    • Special Effect - Destroy Variable
    • Custom script: call DestroyEffect (udg_Variable)
Hope it helps:)
 
That's... absolutely pointless.

Please DON'T listen to/use MemoryLeakHelper, use your OWN head!
You don't need a program to do everything for you... it doesn't leak, that's all you should know.

Also, don't use variables and custom scripts for special effects, it only makes the coding worse (more lines -> less efficient -> drains more CPU + file size).


There IS one thing though:

It's either this:
  • Special Effect - Create a special effect at (Position of (Unit)) using <SPECIAL EFFECT>
Or this:
  • Special Effect - Create a special effect attached to the foot of (Unit) using <SPECIAL EFFECT>
Your action doesn't exist ("Create special effect at foot of (Unit)").
If it is the first one: it does leak, it leaks a location.
If it's the second one: it doesn't leak.


For easy trigger copy/pasting: right-click anything in the trigger editor and select "copy as text", then you can paste it here.
(Additionally, you can click the trigger's header to CnP the entire trigger, or Events/Conditions/Actions to CnP eiter one of them).
 
Or can I use dummy units and order them to cast a spell(to create the special effect)? That is the only thing efficient I can do to prevent leak(s).
 
Status
Not open for further replies.
Back
Top