1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Map lags to the point of being unplayable

Discussion in 'World Editor Help Zone' started by DaneTheBeast, Jan 29, 2015.

  1. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    In my map after playing it for some times it start to lag so much it brings you down to even 1 FPS, later it will be 0, then it unlags for 1 minute and again start choking.

    I read about leaks but no matter what I still don't understand them. I use GUI.
    Can anyone tell me why they think it might be happening, with my low knowledge of WE I just can't seem to figure it out. Ty<3
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    It "unlags"? Leaks are permanent until you end the game.

    Though mass heavy operation and creation may be cause of lags.
    (Too heavy operation for example: PickingAllUnitsInmap each 0.01 seconds)

    For leaks: http://www.hiveworkshop.com/forums/triggers-scripts-269/things-leak-35124/
    Focus on triggers that run periodicly at first. It's especially them, who can have bad influence.
     
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,189
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Can you confirm that this issue affects multiple different system specifications?

    It could be caused by a background process or a lack of memory on one particular system. Such issues can be transient.
     
  4. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Everyone in the game start to experience it at the same time. System specifications are not the case.
     
  5. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    The only time of unit group i have is when a player leaves that it gets all his units and deletes them, there are some other but they are triggered by an event. it doesn't do "every 0.01 seconds of the game"
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,189
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    We will need to see the map where this is re-creatable. Explain how to re-create it quickly as well.
     
  7. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Ok, that will work. Here is what I will do, I will go and try to test it with other people ,if I encounter the major lag again I will PM you if you want with the map and how to get it to lag.
     
  8. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    It might be because some of the models used? Is that possible? How can I know if a custom model is causing the lag?
     
  9. LordDz

    LordDz

    Joined:
    May 11, 2007
    Messages:
    4,303
    Resources:
    0
    Resources:
    0
    "I read about leaks but no matter what I still don't understand them. I use GUI."
    Post your triggers/the map.
     
  10. DaneTheBeast

    DaneTheBeast

    Joined:
    Dec 11, 2014
    Messages:
    608
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I already PMed to Dr Super Good, but since I already made it public here you go: Map

    Just open the map freely because it's not protected. Thanks for trying to help :)
     
  11. deathismyfriend

    deathismyfriend

    Joined:
    Oct 24, 2012
    Messages:
    6,526
    Resources:
    14
    Spells:
    12
    Tutorials:
    2
    Resources:
    14
    You have a lot of errors in your map that should be corrected.

    You have a lot of unit group leaks. These can eventually cause lag.

    Never use integer A / B. Create your own integer in the variable editor and use that integer in place of integer A / B.

    Anything you use twice or more should be stored in a variable and the variable should be used. Example: Set tempUnit = (Picked unit). Then use tempUnit in place of picked unit.

    Use triggering unit instead of trained unit / entering unit / dying unit / sold unit / and others.

    You have location leaks which can cause lag.

    You use a gold giving trigger that is inefficient. You can use mine. It is on this site and is more efficient and allows a couple of different options on how to give gold. It will also decrease your map size by a little bit. My system is in jass but everything you need to edit / change is all in GUI so it is easy to use. http://www.hiveworkshop.com/forums/spells-569/give-gold-lumber-system-v-1-0-1-4-a-238447/ There are 2 systems one for giving gold and one for giving lumber in that link. You can use one or both if you feel like it.

    You should take a look at my tutorial Things you should know when using triggers / GUI. This will help you to code more efficiently.

    Other than the things mentioned the map looks pretty good. ( I didn't test for any corrupted objects)
    If you have a lot of location leaks then the game typically lags when your screen is focused on the general area of the location leak. As you move away the lag goes away. (not all the way away )
     
  12. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    26,189
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    From what I could tell he had some, but not a lot. Those were finite in number since they were mostly initialization or once off events like player leaves.

    Not his problem. Those do not leak nor do they cause poor performance for most purposes.

    That is correct however makes only really a difference in high performance code, of which he has none of.

    Makes only a difference in performance code. He has none of such code.

    Currently this is what I am thinking is the cause of the poor performance. Every spawn and every way point leaks a location which will add up over time.

    Without a replay which ends by performing badly I cannot rule out other factors such as excessive visual effects etc.

    As good as it is, that is not his problem. It is not like he has any performance critical code in the first place let alone such code that deals with gold.

    Incorrect? Location leaks do not alter performance at all by themselves. Instead they will make location based operations more computationally expensive (especially ones that return location objects).

    You might be confused with special effect leaks. Although the model is not visible (due to animations) it will still be animated and rendered when in view. With enough special effect leaks viewing an area might require several frames of GPU time to generate a single display frame.

    Items also suffer a similar graphic leak if they are killed instead of removed. Since items lack decay and then removal, all killed items persist until end of session or removal. His map does not suffer from this item leak since he removes all his items. His map might suffer from internal widget leakage however but that is hard to prove.

    His sell trigger leaks a special effect. This should be minor for most TDs (as selling is bad) however if selling occurs a lot it would explain his performance problem.

    I do not think locations have to even be valid. People used to use them as data structures by direct typecasting integers into them. Locations also do nothing with the camera so I doubt viewing them can possibly lower performance.