WeakAuras

WeakAuras

206M Downloads

Dynamic Group: Optimize reacting to state changes

InfusOnWoW opened this issue ยท 2 comments

commented

Currently we sort/grow regions whenever the state changed, since we cannot easily know what the sort/grow function uses to decide the order/layout of the regions. This is a problem for "Vardex" layouts, which is layouts that layout the class abilities. Those layouts do not change whenever the state changs, they change depending on choosen talents.

A maybe useful concept would be to distinguish between sort/grow functions that depend on the state's contents, and sort/grow functions that only depend on state existance or other information that is constant such as the "dataIndex".

We would need to:

  • Provide a setting for custom sort/grow functions to declare that they don't depend on state contents.
  • Maybe give them less information to work on?
  • Analyze our own grow/sort functions and make them declare whether they depend on the state content.
commented

This reminds me of the way some load conditions are static within an aura's Add() lifetime - never, class, player name & realm, etc. Perhaps there's some fertile ground here to teach WeakAuras that some data is more set in stone than others in general, and thus should be evaluated once & never afterwards.

commented

Yes there's definately the same problem everywhere of identifiyng change and how to react to it.
In this case, my point is that a solution that only adds the additional question of whether state contents are relevant, and puts the onerous of answering that on the author might be a pretty easy to implemt while giving us a huge benefit. Even if it isn't the most clean solution.