Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#5099 closed defect (fixed)

Relic aura defeat lag

Reported by: elexis Owned by: elexis
Priority: Must Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch: Phab:D1426

Description (last modified by elexis)

In this svn match we have noticed heavy lag spikes when players were defeated. They are the highest peaks in the replay profile graph.

It took more than 10 to 20 seconds to compute the next turn, despite the affected players having lost only few remaining units.

Adding debug output showed that it is

(1) the Clean call in the Auras component, called from OnPlayerDefeated in this component and (2) only relic entities that cause heavy lag

https://trac.wildfiregames.com/raw-attachment/ticket/5099/graph.png

Attachments (4)

graph.png (129.3 KB) - added by elexis 2 years ago.
greatest peaks are defeats.7z (270.9 KB) - added by elexis 2 years ago.
commands.txt, profile.txt, revision, log output, Mirror of https://code.wildfiregames.com/F425077
auralog.7z (7.5 KB) - added by elexis 2 years ago.
debug output patch and the log created by it
notapatch.js (200 bytes) - added by fatherbushido 2 years ago.
nocomments, nounittests, notadressingthewholeticket, notapatch

Download all attachments as: .zip

Change History (16)

Changed 2 years ago by elexis

Attachment: graph.png added

comment:1 Changed 2 years ago by temple

The main culprit was brit_catafalque_1, specifically { "value": "Vision/Range", "multiply": 1.15 } which applied to all soldiers, and gaia had a few thousand soldiers in this match on Jebel Barkal. That took about 70% of the total time, and around 100x the time of any other aura that was applied to a similar number of units. I'm guessing this is because a LOS grid has to be recalculated or something, whereas other auras don't have much of an effect besides changing a number. (I haven't looked into the details so that might not be correct.)

Changed 2 years ago by elexis

commands.txt, profile.txt, revision, log output, Mirror of https://code.wildfiregames.com/F425077

comment:2 Changed 2 years ago by elexis

I've run the simulation replay again, collecting aura debug output, only on defeat.

There are multiple auras that are slower than what they should be. If we want to aim at 200ms or even 100ms turn lengths, then every aura must be finished in an order of magnitude of 10ms ideally.

All auras:

Female inspiration aura is fast enough: cat profiling_aura.txt | grep female_inspiration | sort | uniq -c

    886 WARNING: 0 Cleaning aura units/female_inspiration
      1 WARNING: 12 Cleaning aura units/female_inspiration
     12 WARNING: 1 Cleaning aura units/female_inspiration

Hero Auras:

     28 WARNING: 0 Cleaning aura units/heroes/hero_garrison
      4 WARNING: 0 Cleaning aura units/heroes/kush_hero_amanirenas
      5 WARNING: 0 Cleaning aura units/heroes/kush_hero_arakamani_3
      8 WARNING: 0 Cleaning aura units/heroes/kush_hero_nastasen_1
      1 WARNING: 106 Cleaning aura units/heroes/kush_hero_arakamani_2
      1 WARNING: 108 Cleaning aura units/heroes/kush_hero_arakamani_1
      1 WARNING: 10 Cleaning aura units/heroes/gaul_hero_viridomarus
      1 WARNING: 111 Cleaning aura units/heroes/kush_hero_arakamani_1
      1 WARNING: 114 Cleaning aura units/heroes/kush_hero_arakamani_2
      1 WARNING: 117 Cleaning aura units/heroes/gaul_hero_viridomarus
      1 WARNING: 11 Cleaning aura units/heroes/rome_hero_maximus
      1 WARNING: 128 Cleaning aura units/heroes/gaul_hero_viridomarus
      1 WARNING: 134 Cleaning aura units/heroes/kush_hero_arakamani_2
      1 WARNING: 16 Cleaning aura units/heroes/rome_hero_maximus
      1 WARNING: 17 Cleaning aura units/heroes/rome_hero_maximus
      4 WARNING: 1 Cleaning aura units/heroes/hero_garrison
      1 WARNING: 1 Cleaning aura units/heroes/kush_hero_amanirenas
      1 WARNING: 21 Cleaning aura units/heroes/kush_hero_nastasen_2
      1 WARNING: 24 Cleaning aura units/heroes/kush_hero_nastasen_2
      2 WARNING: 2 Cleaning aura units/heroes/iber_hero_indibil
      2 WARNING: 35 Cleaning aura units/heroes/kush_hero_nastasen_2
      2 WARNING: 37 Cleaning aura units/heroes/kush_hero_nastasen_2
      1 WARNING: 3 Cleaning aura units/heroes/iber_hero_indibil
      1 WARNING: 3 Cleaning aura units/heroes/rome_hero_maximus
      1 WARNING: 47 Cleaning aura units/heroes/kush_hero_nastasen_2
      1 WARNING: 4 Cleaning aura units/heroes/iber_hero_indibil
      1 WARNING: 61 Cleaning aura units/heroes/kush_hero_nastasen_2
      1 WARNING: 75 Cleaning aura units/heroes/kush_hero_arakamani_1
      1 WARNING: 79 Cleaning aura units/heroes/kush_hero_arakamani_1
      1 WARNING: 86 Cleaning aura units/heroes/kush_hero_arakamani_2
      1 WARNING: 89 Cleaning aura units/heroes/kush_hero_arakamani_2
      1 WARNING: 8 Cleaning aura units/heroes/gaul_hero_viridomarus
      1 WARNING: 8 Cleaning aura units/heroes/rome_hero_maximus
      1 WARNING: 90 Cleaning aura units/heroes/kush_hero_arakamani_1
      1 WARNING: 9 Cleaning aura units/heroes/gaul_hero_viridomarus

Catafalque:

      5 WARNING: 0 Cleaning aura units/catafalques/athen_catafalque_1
      4 WARNING: 0 Cleaning aura units/catafalques/kush_catafalque_2
      3 WARNING: 0 Cleaning aura units/catafalques/sele_catafalque_2
      4 WARNING: 0 Cleaning aura units/catafalques/spart_catafalque_3
      1 WARNING: 103 Cleaning aura units/catafalques/spart_catafalque_1
      1 WARNING: 108 Cleaning aura units/catafalques/pers_catafalque
      1 WARNING: 109 Cleaning aura units/catafalques/maur_catafalque_2
      1 WARNING: 116 Cleaning aura units/catafalques/pers_catafalque
      1 WARNING: 116 Cleaning aura units/catafalques/spart_catafalque_1
      1 WARNING: 127 Cleaning aura units/catafalques/spart_catafalque_1
      1 WARNING: 130 Cleaning aura units/catafalques/pers_catafalque
      2 WARNING: 139 Cleaning aura units/catafalques/gaul_catafalque_2
      1 WARNING: 148 Cleaning aura units/catafalques/iber_catafalque_2
      1 WARNING: 150 Cleaning aura units/catafalques/gaul_catafalque_2
      1 WARNING: 150 Cleaning aura units/catafalques/iber_catafalque_2
      1 WARNING: 151 Cleaning aura units/catafalques/pers_catafalque
      1 WARNING: 156 Cleaning aura units/catafalques/gaul_catafalque_2
      1 WARNING: 163 Cleaning aura units/catafalques/iber_catafalque_2
      1 WARNING: 177 Cleaning aura units/catafalques/gaul_catafalque_2
      1 WARNING: 17 Cleaning aura units/catafalques/maur_catafalque_2
      1 WARNING: 18 Cleaning aura units/catafalques/maur_catafalque_2
      1 WARNING: 18 Cleaning aura units/catafalques/ptol_catafalque
      1 WARNING: 190 Cleaning aura units/catafalques/iber_catafalque_2
      1 WARNING: 191 Cleaning aura units/catafalques/iber_catafalque_2
      1 WARNING: 1 Cleaning aura units/catafalques/cart_catafalque
      1 WARNING: 1 Cleaning aura units/catafalques/kush_catafalque_2
      5 WARNING: 1 Cleaning aura units/catafalques/mace_catafalque
      2 WARNING: 1 Cleaning aura units/catafalques/sele_catafalque_2
      1 WARNING: 1 Cleaning aura units/catafalques/spart_catafalque_3
      1 WARNING: 21 Cleaning aura units/catafalques/kush_catafalque_1
      1 WARNING: 22 Cleaning aura units/catafalques/ptol_catafalque
      1 WARNING: 235 Cleaning aura units/catafalques/rome_catafalque_2
      1 WARNING: 246 Cleaning aura units/catafalques/rome_catafalque_2
      1 WARNING: 25 Cleaning aura units/catafalques/kush_catafalque_1
      1 WARNING: 26 Cleaning aura units/catafalques/athen_catafalque_2
      1 WARNING: 273 Cleaning aura units/catafalques/rome_catafalque_2
      3 WARNING: 2 Cleaning aura units/catafalques/cart_catafalque
      3 WARNING: 2 Cleaning aura units/catafalques/maur_catafalque_1
      1 WARNING: 312 Cleaning aura units/catafalques/rome_catafalque_2
      1 WARNING: 329 Cleaning aura units/catafalques/rome_catafalque_2
      1 WARNING: 33 Cleaning aura units/catafalques/maur_catafalque_1
      1 WARNING: 34 Cleaning aura units/catafalques/sele_catafalque_3
      1 WARNING: 37 Cleaning aura units/catafalques/brit_catafalque_2
      1 WARNING: 37 Cleaning aura units/catafalques/rome_catafalque_1
      1 WARNING: 38 Cleaning aura units/catafalques/sele_catafalque_1
      1 WARNING: 3 Cleaning aura units/catafalques/kush_catafalque_1
      1 WARNING: 3 Cleaning aura units/catafalques/maur_catafalque_1
      1 WARNING: 41 Cleaning aura units/catafalques/spart_catafalque_2
      1 WARNING: 4758 Cleaning aura units/catafalques/brit_catafalque_1
      1 WARNING: 47 Cleaning aura units/catafalques/athen_catafalque_2
      1 WARNING: 48 Cleaning aura units/catafalques/athen_catafalque_2
      1 WARNING: 51 Cleaning aura units/catafalques/rome_catafalque_1
      1 WARNING: 51 Cleaning aura units/catafalques/sele_catafalque_3
      1 WARNING: 547 Cleaning aura units/catafalques/gaul_catafalque_1
      1 WARNING: 54 Cleaning aura units/catafalques/brit_catafalque_2
      1 WARNING: 55 Cleaning aura units/catafalques/iber_catafalque_1
      1 WARNING: 5640 Cleaning aura units/catafalques/brit_catafalque_1
      1 WARNING: 570 Cleaning aura units/catafalques/gaul_catafalque_1
      1 WARNING: 57 Cleaning aura units/catafalques/sele_catafalque_1
      1 WARNING: 57 Cleaning aura units/catafalques/sele_catafalque_3
      1 WARNING: 59 Cleaning aura units/catafalques/sele_catafalque_3
      2 WARNING: 5 Cleaning aura units/catafalques/maur_catafalque_2
      2 WARNING: 5 Cleaning aura units/catafalques/ptol_catafalque
      1 WARNING: 60 Cleaning aura units/catafalques/iber_catafalque_1
      1 WARNING: 61 Cleaning aura units/catafalques/sele_catafalque_1
      1 WARNING: 63 Cleaning aura units/catafalques/brit_catafalque_2
      1 WARNING: 63 Cleaning aura units/catafalques/sele_catafalque_1
      1 WARNING: 64 Cleaning aura units/catafalques/athen_catafalque_2
      1 WARNING: 64 Cleaning aura units/catafalques/sele_catafalque_1
      1 WARNING: 65 Cleaning aura units/catafalques/spart_catafalque_2
      1 WARNING: 661 Cleaning aura units/catafalques/gaul_catafalque_1
      1 WARNING: 66 Cleaning aura units/catafalques/athen_catafalque_2
      1 WARNING: 67 Cleaning aura units/catafalques/sele_catafalque_3
      1 WARNING: 688 Cleaning aura units/catafalques/gaul_catafalque_1
      1 WARNING: 7067 Cleaning aura units/catafalques/brit_catafalque_1
      1 WARNING: 71 Cleaning aura units/catafalques/brit_catafalque_2
      1 WARNING: 7256 Cleaning aura units/catafalques/brit_catafalque_1
      1 WARNING: 72 Cleaning aura units/catafalques/iber_catafalque_1
      1 WARNING: 72 Cleaning aura units/catafalques/rome_catafalque_1
      1 WARNING: 73 Cleaning aura units/catafalques/rome_catafalque_1
      1 WARNING: 73 Cleaning aura units/catafalques/spart_catafalque_2
      1 WARNING: 74 Cleaning aura units/catafalques/brit_catafalque_2
      1 WARNING: 74 Cleaning aura units/catafalques/ptol_catafalque
      1 WARNING: 75 Cleaning aura units/catafalques/spart_catafalque_2
      1 WARNING: 76 Cleaning aura units/catafalques/spart_catafalque_2
      1 WARNING: 774 Cleaning aura units/catafalques/gaul_catafalque_1
      1 WARNING: 78 Cleaning aura units/catafalques/iber_catafalque_1
      1 WARNING: 79 Cleaning aura units/catafalques/rome_catafalque_1
      1 WARNING: 80 Cleaning aura units/catafalques/iber_catafalque_1
      1 WARNING: 80 Cleaning aura units/catafalques/spart_catafalque_1
      1 WARNING: 81 Cleaning aura units/catafalques/kush_catafalque_1
      1 WARNING: 85 Cleaning aura units/catafalques/cart_catafalque
      1 WARNING: 87 Cleaning aura units/catafalques/kush_catafalque_1
      1 WARNING: 87 Cleaning aura units/catafalques/pers_catafalque
      1 WARNING: 9030 Cleaning aura units/catafalques/brit_catafalque_1
      1 WARNING: 96 Cleaning aura units/catafalques/spart_catafalque_1

Team Bonuses:

      2 WARNING: 0 Cleaning aura teambonuses/cart_player_teambonus
      3 WARNING: 0 Cleaning aura teambonuses/gaul_player_teambonus
      3 WARNING: 0 Cleaning aura teambonuses/iber_player_teambonus
      1 WARNING: 0 Cleaning aura teambonuses/rome_player_teambonus
      1 WARNING: 13 Cleaning aura teambonuses/cart_player_teambonus
      1 WARNING: 14 Cleaning aura teambonuses/cart_player_teambonus
      1 WARNING: 14 Cleaning aura teambonuses/spart_player_teambonus
      3 WARNING: 1 Cleaning aura teambonuses/cart_player_teambonus
      3 WARNING: 1 Cleaning aura teambonuses/iber_player_teambonus
      2 WARNING: 2 Cleaning aura teambonuses/spart_player_teambonus
      1 WARNING: 3 Cleaning aura teambonuses/spart_player_teambonus
      3 WARNING: 5 Cleaning aura teambonuses/rome_player_teambonus
      1 WARNING: 6 Cleaning aura teambonuses/rome_player_teambonus

Temple Auras:

      5 WARNING: 0 Cleaning aura structures/epic_temple_heal
     41 WARNING: 0 Cleaning aura structures/temple_heal
      1 WARNING: 14 Cleaning aura structures/temple_heal
      3 WARNING: 1 Cleaning aura structures/temple_heal
      1 WARNING: 24 Cleaning aura structures/kush_temple_amun
      1 WARNING: 26 Cleaning aura structures/kush_temple_amun
      2 WARNING: 42 Cleaning aura structures/kush_temple_amun
      1 WARNING: 46 Cleaning aura structures/kush_temple_amun
      1 WARNING: 48 Cleaning aura structures/kush_temple_amun
      1 WARNING: 58 Cleaning aura structures/kush_temple_amun
      1 WARNING: 61 Cleaning aura structures/kush_temple_amun
      2 WARNING: 62 Cleaning aura structures/kush_temple_amun

Others:

     15 WARNING: 0 Cleaning aura structures/kush_pyramids_economic
    180 WARNING: 0 Cleaning aura structures/wall_garrisoned
      4 WARNING: 0 Cleaning aura structures/wonder_pop_1
      5 WARNING: 0 Cleaning aura structures/wonder_pop_2
      1 WARNING: 16 Cleaning aura structures/wall_garrisoned
      1 WARNING: 19 Cleaning aura structures/wall_garrisoned
      3 WARNING: 1 Cleaning aura structures/wall_garrisoned
      1 WARNING: 1 Cleaning aura structures/wonder_pop_1
      1 WARNING: 20 Cleaning aura structures/wall_garrisoned
     40 WARNING: 4 Cleaning aura structures/wall_garrisoned
     90 WARNING: 5 Cleaning aura structures/wall_garrisoned
     56 WARNING: 6 Cleaning aura structures/wall_garrisoned
      1 WARNING: 7 Cleaning aura structures/wall_garrisoned

comment:3 Changed 2 years ago by elexis

All Auras sorted by time spent:

 9030 Cleaning aura units/catafalques/brit_catafalque_1
 7256 Cleaning aura units/catafalques/brit_catafalque_1
 7067 Cleaning aura units/catafalques/brit_catafalque_1
 5640 Cleaning aura units/catafalques/brit_catafalque_1
 4758 Cleaning aura units/catafalques/brit_catafalque_1
 774 Cleaning aura units/catafalques/gaul_catafalque_1
 688 Cleaning aura units/catafalques/gaul_catafalque_1
 661 Cleaning aura units/catafalques/gaul_catafalque_1
 570 Cleaning aura units/catafalques/gaul_catafalque_1
 547 Cleaning aura units/catafalques/gaul_catafalque_1
 329 Cleaning aura units/catafalques/rome_catafalque_2
 312 Cleaning aura units/catafalques/rome_catafalque_2
 273 Cleaning aura units/catafalques/rome_catafalque_2
 246 Cleaning aura units/catafalques/rome_catafalque_2
 235 Cleaning aura units/catafalques/rome_catafalque_2
 191 Cleaning aura units/catafalques/iber_catafalque_2
 190 Cleaning aura units/catafalques/iber_catafalque_2
 177 Cleaning aura units/catafalques/gaul_catafalque_2
 163 Cleaning aura units/catafalques/iber_catafalque_2
 156 Cleaning aura units/catafalques/gaul_catafalque_2
 151 Cleaning aura units/catafalques/pers_catafalque
 150 Cleaning aura units/catafalques/iber_catafalque_2
 150 Cleaning aura units/catafalques/gaul_catafalque_2
 148 Cleaning aura units/catafalques/iber_catafalque_2
 139 Cleaning aura units/catafalques/gaul_catafalque_2
 134 Cleaning aura units/heroes/kush_hero_arakamani_2
 130 Cleaning aura units/catafalques/pers_catafalque
 128 Cleaning aura units/heroes/gaul_hero_viridomarus
 127 Cleaning aura units/catafalques/spart_catafalque_1
 117 Cleaning aura units/heroes/gaul_hero_viridomarus
 116 Cleaning aura units/catafalques/spart_catafalque_1
 116 Cleaning aura units/catafalques/pers_catafalque
 114 Cleaning aura units/heroes/kush_hero_arakamani_2
 111 Cleaning aura units/heroes/kush_hero_arakamani_1
 109 Cleaning aura units/catafalques/maur_catafalque_2
 108 Cleaning aura units/heroes/kush_hero_arakamani_1
 108 Cleaning aura units/catafalques/pers_catafalque
 106 Cleaning aura units/heroes/kush_hero_arakamani_2
 103 Cleaning aura units/catafalques/spart_catafalque_1
 96 Cleaning aura units/catafalques/spart_catafalque_1
 90 Cleaning aura units/heroes/kush_hero_arakamani_1
 89 Cleaning aura units/heroes/kush_hero_arakamani_2
 87 Cleaning aura units/catafalques/pers_catafalque
 87 Cleaning aura units/catafalques/kush_catafalque_1
 86 Cleaning aura units/heroes/kush_hero_arakamani_2
 85 Cleaning aura units/catafalques/cart_catafalque
 81 Cleaning aura units/catafalques/kush_catafalque_1
 80 Cleaning aura units/catafalques/spart_catafalque_1
 80 Cleaning aura units/catafalques/iber_catafalque_1
 79 Cleaning aura units/heroes/kush_hero_arakamani_1
 79 Cleaning aura units/catafalques/rome_catafalque_1
 78 Cleaning aura units/catafalques/iber_catafalque_1
 76 Cleaning aura units/catafalques/spart_catafalque_2
 75 Cleaning aura units/heroes/kush_hero_arakamani_1
 75 Cleaning aura units/catafalques/spart_catafalque_2
 74 Cleaning aura units/catafalques/ptol_catafalque
 74 Cleaning aura units/catafalques/brit_catafalque_2
 73 Cleaning aura units/catafalques/spart_catafalque_2
 73 Cleaning aura units/catafalques/rome_catafalque_1
 72 Cleaning aura units/catafalques/rome_catafalque_1
 72 Cleaning aura units/catafalques/iber_catafalque_1
 71 Cleaning aura units/catafalques/brit_catafalque_2
 67 Cleaning aura units/catafalques/sele_catafalque_3
 66 Cleaning aura units/catafalques/athen_catafalque_2
 65 Cleaning aura units/catafalques/spart_catafalque_2
 64 Cleaning aura units/catafalques/sele_catafalque_1
 64 Cleaning aura units/catafalques/athen_catafalque_2
 63 Cleaning aura units/catafalques/sele_catafalque_1
 63 Cleaning aura units/catafalques/brit_catafalque_2
 62 Cleaning aura structures/kush_temple_amun
 61 Cleaning aura units/heroes/kush_hero_nastasen_2
 61 Cleaning aura units/catafalques/sele_catafalque_1
 61 Cleaning aura structures/kush_temple_amun
 60 Cleaning aura units/catafalques/iber_catafalque_1
 59 Cleaning aura units/catafalques/sele_catafalque_3
 58 Cleaning aura structures/kush_temple_amun
 57 Cleaning aura units/catafalques/sele_catafalque_3
 57 Cleaning aura units/catafalques/sele_catafalque_1
 55 Cleaning aura units/catafalques/iber_catafalque_1
 54 Cleaning aura units/catafalques/brit_catafalque_2
 51 Cleaning aura units/catafalques/sele_catafalque_3
 51 Cleaning aura units/catafalques/rome_catafalque_1
 48 Cleaning aura units/catafalques/athen_catafalque_2
 48 Cleaning aura structures/kush_temple_amun
 47 Cleaning aura units/heroes/kush_hero_nastasen_2
 47 Cleaning aura units/catafalques/athen_catafalque_2
 46 Cleaning aura structures/kush_temple_amun
 42 Cleaning aura structures/kush_temple_amun
 41 Cleaning aura units/catafalques/spart_catafalque_2
 38 Cleaning aura units/catafalques/sele_catafalque_1
 37 Cleaning aura units/heroes/kush_hero_nastasen_2
 37 Cleaning aura units/catafalques/rome_catafalque_1
 37 Cleaning aura units/catafalques/brit_catafalque_2
 35 Cleaning aura units/heroes/kush_hero_nastasen_2
 34 Cleaning aura units/catafalques/sele_catafalque_3
 33 Cleaning aura units/catafalques/maur_catafalque_1
 26 Cleaning aura units/catafalques/athen_catafalque_2
 26 Cleaning aura structures/kush_temple_amun
 25 Cleaning aura units/catafalques/kush_catafalque_1
 24 Cleaning aura units/heroes/kush_hero_nastasen_2
 24 Cleaning aura structures/kush_temple_amun
 22 Cleaning aura units/catafalques/ptol_catafalque
 21 Cleaning aura units/heroes/kush_hero_nastasen_2
 21 Cleaning aura units/catafalques/kush_catafalque_1
 20 Cleaning aura structures/wall_garrisoned
 19 Cleaning aura structures/wall_garrisoned
 18 Cleaning aura units/catafalques/ptol_catafalque
 18 Cleaning aura units/catafalques/maur_catafalque_2
 17 Cleaning aura units/heroes/rome_hero_maximus
 17 Cleaning aura units/catafalques/maur_catafalque_2
 16 Cleaning aura units/heroes/rome_hero_maximus
 16 Cleaning aura structures/wall_garrisoned
 14 Cleaning aura teambonuses/spart_player_teambonus
 14 Cleaning aura teambonuses/cart_player_teambonus
 14 Cleaning aura structures/temple_heal
 13 Cleaning aura teambonuses/cart_player_teambonus
 12 Cleaning aura units/female_inspiration
 11 Cleaning aura units/heroes/rome_hero_maximus
 10 Cleaning aura units/heroes/gaul_hero_viridomarus
 9 Cleaning aura units/heroes/gaul_hero_viridomarus
 8 Cleaning aura units/heroes/rome_hero_maximus
 8 Cleaning aura units/heroes/gaul_hero_viridomarus
 7 Cleaning aura structures/wall_garrisoned
 6 Cleaning aura teambonuses/rome_player_teambonus
 6 Cleaning aura structures/wall_garrisoned
 5 Cleaning aura units/catafalques/ptol_catafalque
 5 Cleaning aura units/catafalques/maur_catafalque_2
 5 Cleaning aura teambonuses/rome_player_teambonus
 5 Cleaning aura structures/wall_garrisoned
 4 Cleaning aura units/heroes/iber_hero_indibil
 4 Cleaning aura structures/wall_garrisoned
 3 Cleaning aura units/heroes/rome_hero_maximus
 3 Cleaning aura units/heroes/iber_hero_indibil
 3 Cleaning aura units/catafalques/maur_catafalque_1
 3 Cleaning aura units/catafalques/kush_catafalque_1
 3 Cleaning aura teambonuses/spart_player_teambonus
 2 Cleaning aura units/heroes/iber_hero_indibil
 2 Cleaning aura units/catafalques/maur_catafalque_1
 2 Cleaning aura units/catafalques/cart_catafalque
 2 Cleaning aura teambonuses/spart_player_teambonus
 1 Cleaning aura units/heroes/kush_hero_amanirenas
 1 Cleaning aura units/heroes/hero_garrison
 1 Cleaning aura units/female_inspiration
 1 Cleaning aura units/catafalques/spart_catafalque_3
 1 Cleaning aura units/catafalques/sele_catafalque_2
 1 Cleaning aura units/catafalques/mace_catafalque
 1 Cleaning aura units/catafalques/kush_catafalque_2
 1 Cleaning aura units/catafalques/cart_catafalque
 1 Cleaning aura teambonuses/iber_player_teambonus
 1 Cleaning aura teambonuses/cart_player_teambonus
 1 Cleaning aura structures/wonder_pop_1
 1 Cleaning aura structures/wall_garrisoned
 1 Cleaning aura structures/temple_heal
 0 Cleaning aura units/heroes/kush_hero_nastasen_1
 0 Cleaning aura units/heroes/kush_hero_arakamani_3
 0 Cleaning aura units/heroes/kush_hero_amanirenas
 0 Cleaning aura units/heroes/hero_garrison
 0 Cleaning aura units/female_inspiration
 0 Cleaning aura units/catafalques/spart_catafalque_3
 0 Cleaning aura units/catafalques/sele_catafalque_2
 0 Cleaning aura units/catafalques/kush_catafalque_2
 0 Cleaning aura units/catafalques/athen_catafalque_1
 0 Cleaning aura teambonuses/rome_player_teambonus
 0 Cleaning aura teambonuses/iber_player_teambonus
 0 Cleaning aura teambonuses/gaul_player_teambonus
 0 Cleaning aura teambonuses/cart_player_teambonus
 0 Cleaning aura structures/wonder_pop_2
 0 Cleaning aura structures/wonder_pop_1
 0 Cleaning aura structures/wall_garrisoned
 0 Cleaning aura structures/temple_heal
 0 Cleaning aura structures/kush_pyramids_economic
 0 Cleaning aura structures/epic_temple_heal

comment:4 Changed 2 years ago by elexis

Description: modified (diff)

Changed 2 years ago by elexis

Attachment: auralog.7z added

debug output patch and the log created by it

Changed 2 years ago by fatherbushido

Attachment: notapatch.js added

nocomments, nounittests, notadressingthewholeticket, notapatch

comment:5 in reply to:  1 ; Changed 2 years ago by mimo

Replying to temple:

The main culprit was brit_catafalque_1, specifically { "value": "Vision/Range", "multiply": 1.15 } which applied to all soldiers, and gaia had a few thousand soldiers in this match on Jebel Barkal. That took about 70% of the total time, and around 100x the time of any other aura that was applied to a similar number of units. I'm guessing this is because a LOS grid has to be recalculated or something, whereas other auras don't have much of an effect besides changing a number. (I haven't looked into the details so that might not be correct.)

Yes, gaia visibility is not cached, and recomputed every time.

But is it really useful for gameplay that catafalque auras also apply to gaia? i would say no, specially if it affects performance.

comment:6 in reply to:  5 Changed 2 years ago by elexis

Replying to mimo:

But is it really useful for gameplay that catafalque auras also apply to gaia? i would say no, specially if it affects performance.

That was my first thought too. The question is whether we can rule out that auras affect gaia. Some maps or mods might want to do it for any purpose. In that case we'd have to add an AffectsGaia boolean to the aura or similar. On the other hand Gaia doesn't have a TechnologyManager? and this has already led to repeated issues (wanting to spawn Elite gaia units but those ending up with the same stats as Basic units.)

Hence I think we can nuke gaia. (It might be better to add support for more than 8 players and use an unassignable undefeatable player 9 for these scenarios)

Replying to fatherbushido:

nocomments, nounittests, notadressingthewholeticket, notapatch

Gah, what a stupid oversight, thanks for pointing it out! Despite some auras being particularly slow, this does in fact fix the core of the ticket (aura defeat lag).

Replying to bb:

19:07 < bb> only what happens with team bonus?

Should be the same as with the other auras, but I'll do some testing now.

comment:7 Changed 2 years ago by elexis

Patch: Phab:D1426

The briton relic aura should be changed to only apply to few units I suppose. The other auras should also be reconsidered and maybe we can make it not apply to gaia.

comment:8 Changed 2 years ago by elexis

Milestone: BacklogAlpha 23

comment:9 Changed 2 years ago by elexis

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 21711:

Don't recompute auras of each and every entity globally upon playerdefeat, but only all player auras (for simplicity, and the affected units, structures upon OwnershipChange?), refs rP19093 / D12.
The next diff changes this to a global message subscription, so that it is easier to recognize.

Fixes #5099.
From Differential_Revision: https://code.wildfiregames.com/D1426
Pointed out by: fatherbushido
Reviewed By: temple

comment:10 Changed 2 years ago by elexis

In 21712:

Don't send MT_PlayerDefeated and MT_PlayerWon to components of entities who subscribed locally but aren't the playerentity of the affected player, equal to D733.

Besides the performance improvement for that hypothetical case,
it also means OnGlobalPlayerDefeated? is used consistently and
an oversight like the one fixed by rP21711 might become easier to notice.

From Differential_Revision: https://code.wildfiregames.com/D1426
Reviewed By: temple
Refs #5099

comment:11 Changed 2 years ago by elexis

I don't see anything we can do to prevent the visionrange lag for the british relic. It wouldn't be a useful relic if the vision range addition is local, since the relic is not really a thing you carry with you on the frontline. Removing or replacing the vision range bonus won't prevent anyone else from adding a new aura with vision range bonus (so it would have to be made impossible if we would want that).

There are other auras which are much too slow too (> 50ms), see comments above; including Health, ResourceGatherer?. Nothing obvious I see to improve.

comment:12 Changed 2 years ago by elexis

In 21779:

Update auras of entities of other players that affected the defeated player after rP21711 removed this case handling unintentionally.
Also avoids some unneded player entity aura cleans.

Differential Revision: https://code.wildfiregames.com/D1453
Reported and comments by: fatherbushido
Reviewed By: temple
refs #5099

Note: See TracTickets for help on using tickets.