Adopt blizzard's scroll templates
emptyrivers opened this issue ยท 2 comments
(mostly a note for myself)
While making this little thing I had the opprotunity to work with the 'modern' scroll templates, and I think they could be put to good use in WeakAuras, too. Here is a tutorial on how to make use of them.
In particular, I think we should modify this part of Options to make use of WowScrollBox + LinearizedTreeDataProvider:
We currently use Ace widgets, and are "forced" (are we actually?) to build potentially thousands of them the moment the user opens WeakAurasOptions. This takes a pretty long time if you have a lot of auras, and personally is a big barrier to ever opening options. I predict that using the WowScrollBox system would be the quickest way to eliminate this pain point.
As far as I can tell, WowScrollBox has made its way into every flavor of classic that we support as well, so no need to worry about compatibility problems.
Scrollboxes made using a combination of WowScrollBox + ScrollUtil work differently in important ways:
- ScrollUtil makes heavy use of object pools to minimize total # of frames used. In particular this means that only what actually needs to be displayed in the scroll view is "created".
- instead of maintaining a sorted list of frames at all times, ScrollUtil instead makes use of a data provider which can be provided a sort comparator (not unlike how dynamic group sorting works, though blizzard doesn't bother with the incremental sorting that we do)