WeakAuras

WeakAuras

206M Downloads

A safe-to-use alternative for WeakaurasSaved['displays'][aura_env.id]

Causese opened this issue · 3 comments

commented

Is your feature request related to a problem? Please describe.
Ofter users just want to store few numbers permanently and since WeakaurasSaved['displays'][aura_env.id] is frowned upon, a safe-to-use alternative would be nice.
There should probably be some kind of limit that restricts you from storing too much.
I feel like it's mostly numbers that people want to store.

Describe the solution you'd like
a place within each aura to store things permanently that can only hold a limited amount of characters and an option to wipe it on export?

don't ban me

commented

We have good reasons for frowning on the use of WeakAuras saved variables for persistent data. As innocent as your particular use case might be, we can’t really afford to endorse everybody implementing their own "small little thing" (and those small things are never as small as people like to imagine they actually are), when we’re already pushing the boundaries of what we consider acceptable performance.

For some background, the main reason we never implemented this is for fear of saved variables bloat. Nobody wants a world where every third Wago import generates megabytes of junk data that accumulates in saved variables forever. That’d be a nightmare for users with slowish computers (and if it ever became ubiquitous then we might be forced to protect against outsider edits to our saved variables).

So, deliberately implementing a mechanism for authors to have persistent data stores would need a lot of careful thought on how to protect our users from careless authors who write garbage which somehow becomes popular (see: ipse, afenar, etc). And, we would also want the feature to be actually useful for the bulk of authors’ use cases. If we allowed authors to store exactly 10 numbers (for instance) and threw away any other data they tried to store, then nobody would want to bother with the data store, when they could just quietly sneak their data into an unmanaged spot and be done with it.

I do understand that this is a want. We see it often enough in discord and other places. So I won’t say it will never happen, but this is not in any way a priority.

commented

What about an official plugin that provided a SV? Just some random thoughts about it:

  1. Rename/protect the current WA SV.
  2. New addon adds an alias as WeakAurasSaved, with the same structure as before, for "compatibility".
  3. Provides an interface to read and write data, registering an aura id (maybe uses aura id to find and use the unique id to avoid renaming conflicts).
  4. Has a basic graphic user interface allowing you to clear an aura's specific SV (would it be possible to show how much data is being used by a specific aura?).
  5. (potentially) hook into aura deletion to remove SV specific to that aura. Could also hook into aura renaming as a solution to the second part of thought 3.

This would not be shipped with WA by default, IMO.

But it would give the stubborn developers not only an official and safer means to store data, but also a universal one so the safer devs don't all have their own mini-addons for the sole purpose of SV for an aura.

commented

Well that would certainly solve some of the issues. Though frankly, that's a lot of work for a small gain. For me personally that falls squarely in the "not worth the effort" category.