WoW-Pro Guides

WoW-Pro Guides

3M Downloads

Guide History Location Change

CodingDino opened this issue ยท 12 comments

commented

Currently all guide history (completed step tables) are located in the account wide saved variables file, due to the it being easier for Ace3 to handle it this way. However, I realized today after browsing though Ace's forums that this means, when you load the addon, it technically loads ALL GUIDE HISTORY FOR ALL TOONS into the memory. That's rather a waste!

I would like to create a separate saved variables file on a per character basis for the guide history alone (no settings here, since we need to be able to copy those).

commented

Makes sense :)

commented

I'd like to also have them be module specific, not just per character.

commented

Working on this.

commented

Just repeating myself from another issue... I think some info can be character specific, but still be in the core addon, like the completedQIDs and skippedQIDs.

commented

I'm not sure these are necessary to share between modules - the only one I might see is completedQIDs, but that is a potentially a HUGE table which shouldn't be loaded unnecessarily. Though maybe it doesn't take up as much memory as I feel like it should...

commented

Well, the fact remains that both Leveling and Dungeons modules will make use of completedQIDs, so we need a way to not generate it twice if both modules are loaded. Also, when I said it should be in the core addon, it doesn't mean the core should be responsible to load it. Each module that needs completedQIDs can check if that table already exists in the specified location in WoWProDB and, if not, created it using the core variable. If the table already exists, it means another module created it first. That happens, for example, when both Leveling and Dungeons are loaded.

commented

The problem is, if it's in the WoWProDB, the table is loaded no matter what when the addon boots up, even if it's not needed - it's sitting there in active memory taking up space. At least this is how it was explained to me - I could be wrong though!

Come to think of it, that was from a post discussing the Ace database library - perhaps that's the reason it was always loaded into memory?

If we have a separate set of character-specific SavedVariables in the main addon, that isn't managed by Ace, would we be able to avoid this problem?

commented

Yeah, that's what I was thinking about! Basically, that Ace thing is only good for config options, where you provide the user with a way to copy profiles between chars.

For another hand, come to think of the completedQIDs, I was unecessary confused. It's not in any savedvariable (as far as I know), as it shouldnt, since the addon generates that table once at load time. It doesn't have to be saved between sessions. So, yeah, forget about that... just keep the completedQIDs table in WoWPro table.

commented

Well, I went and mucked with that again. Here's the deal - keeping it in WoWPro's namespace works great IF you don't both reload and reset guides more than once every 10 minutes - since Blizz will only answer a completed QID querry in that stretch of time. For a normal user that's probably a very safe assumption. For a developer, not so much.

So in my current implementation it's back in the savedvariable file, but I think I'll return it to the main namespace. I'd rather have developers be inconvenienced than have players encounter lag due to unecessary memory usage.

commented

I've been thinking about this some more. I think we should keep it in a savedvariable - the potential for user confusion I think outweighs the annoyance of having a large table in memory. WHICH savedvariable to put it in - that is the question.

commented

Update to this!

All SETTINGS are stored in WoWProDB using the Ace profile management system.

All CHARACTER DATA for ALL MODULES are stored in WoWProCharDB.

I'm currently not separating modules into separate tables in there.
All guide progress is recorded based in GID in WoWProCharDB.Guide.
All completed QIDs are stored in WoWProCharDB.completedQIDs.
All skipped QIDs are stored in WoWProCharDB.skippedQIDs.

I'll leave this open for a while longer, but I think this organization will be sufficient for what we need. Please let me know if you feel it won't work or there is a better way!

commented

Awesome, thanks.