Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Add define to see what modules trigger most invalidation #11616

Closed
wants to merge 7 commits into from

Conversation

kLabz
Copy link
Contributor

@kLabz kLabz commented Mar 19, 2024

Compiling (note: this also works for display requests) with -D dump-invalidation-stats (X = 1) or -D dump-invalidation-stats=X will generate a dump/[target]/invalidation_stats.dump file with some data about how many modules are being invalidated because of a given module.

  • direct column is the number of immediate dependencies for that module
  • total column is the total count of modules invalidated because of that module, up to a "dependency depth" of X

Modules are sorted by the total column (DESC), with their dependency tree indented. Modules for which direct = total are not displayed.

Example (partial) output with X = 10:

module                                         | direct |  total |
------------------------------------------------------------------
battle.skill.SkillEval                         |     12 |    425 |
  battle.skill.ScriptedSkill                   |      1 |    407 |
    battle.Battle                              |     15 |    406 |
      st.Group                                 |     25 |    391 |
        ent.Place                              |     23 |    359 |
          st.Item                              |     79 |    334 |
            ent.Player                         |     27 |    248 |
              ent.Entity                       |     30 |    220 |
                ent.UnitView                   |      1 |    187 |
                  prefab.Npc                   |      5 |    186 |
battle.Battle                                  |     15 |    424 |
  st.Group                                     |     25 |    409 |
    ent.Place                                  |     23 |    377 |
      st.Item                                  |     79 |    352 |
        ent.Player                             |     27 |    266 |
          ent.Entity                           |     30 |    238 |
            ent.UnitView                       |      1 |    205 |
              prefab.Npc                       |      5 |    204 |
                Game                           |    179 |    197 |
                  Const                        |      3 |      4 |
                  prefab.BattleSnow            |      1 |      4 |
                  prefab.BattleDithering       |      1 |      2 |
...

cc @ncannasse -- not sure how well that fits your needs, can adjust

@skial skial mentioned this pull request Mar 20, 2024
1 task
@kLabz kLabz added this to the 5.0 preview 1 milestone Apr 29, 2024
@kLabz kLabz removed this from the 5.0 preview 1 milestone Jul 21, 2024
@Simn
Copy link
Member

Simn commented Jul 26, 2024

This PR has conflicts, and somebody has to decide if this is actually useful or not.

@kLabz
Copy link
Contributor Author

kLabz commented Jul 26, 2024

I will rework that at some point, this is not really useful in its current state

@kLabz kLabz closed this Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants