Warmup

During my conversion to Ace mods, I started wondering how long each of my mods added to my login/reloadui time. So I wrote this little bugger to find out. It will dump times into your combat log on startup and reloadUI. You can see how long each mod takes, which mod takes the longest, and each step of loadup (Loading the mods, entering the world, etc).

Oh yea, this will also time zoning across an instance

This also hooks the ReloadUI function (but alas not /console reloadui) and provides a /rlt command to reload with timer. If you use either of these means (but not /console reloadui) then it will time the time of the reload as well (IE it will tell you times for Reload, addons, entering world, total time)

Don't like Ace2 addons' WarmUp numbers? Check out Ace2 Memory Concerns

Understanding Warmup's output
After loading into the game, type /wu to open the Warmup frame. You'll be flooded with a bunch of numbers. here's what they all mean:

0.535 sec | Sample Addon (245 KiB - 429 KiB)


 * 0.535 sec
 * Estimate on how long this addon took to load. This is actually the time between ADDON_LOADED events, which can include a little more that just this addon's loading, but it's a very close estimate of how long the addon took to load.


 * Sample Addon
 * The addon we loaded


 * 245 KiB
 * Memory consumed by the addon. Large numbers here might not be a bad thing, especially if your addon holds lots of data like item prices.


 * 429 KiB
 * The garbage created by this addon. Simply put this is memory the addon used during it's loadup, and then tossed out.  High numbers here can indicate that the addon's initialization could use some optimization.

Warmup will also print some overall stats after all addons have loaded. These stats should be fairly self-explanatory. Due to the changes made for garbage tracking in 2.0, Warmup will extend your login time. It forces a GC cycle after every addon is loaded to find out how much garbage was generated by the addon. Warmup will track GC time and deduct it for the total addon time stat printed after all addons have loaded. It will also print out how much time was spent collecting GC data.

Big important note about v2.0+
Don't leave Warmup enabled every time you log in. The changes for GC data will have drastic effects on your performance. Warmup is a tool to aid addon development, not something for the enduser to just install and forget about.

Because of this, I've tweaked Warmup to auto-disable itself. This means you must manually enable it any time you want to use it. I've also added /rlnd (reload no disable) to allow you to reload the UI with Warmup stil enabled.

Forcing Warmup to load first
Obviously, you want Warmup to load first. This is the reason the folder is named !!Warmup and not just Warmup. The problem is that the !! doesn't always ensure it'll load first for everyone. If you're one of the few who's Warmup won't load first, here's what you do:

Option 1, Windows users
Windows loads addons in the order their folders were created on the disk, oldest first. The simplet trick to make warmup's folder the oldest is:
 * 1) Move all you addons out of the addons folder to a temporary folder
 * 2) Move !!Warmup back to the addons folder
 * 3) Move everything else back

Option 2, All users

 * 1) Launch WoW, log in
 * 2) Open your warmup frame, /wu
 * 3) Scroll to the very top, you should have a whiney message that some addon loaded before Warmup (probably more than one)
 * 4) Open up \Interface\Addons\ on your hard drive
 * 5) Find the file .toc, open it in a text editor
 * 6) Add this line:
 * If an "OptionalDeps" line exists, just append  to it

You can now exit WoW completely and re-login, Warmup should load first

Changelog
v2.0
 * Now shows GC statistics for each addon (will extend loadtime, but tells you how much time was spent on this extra GC)
 * Savedvar log improved, now dumps strings that watch the in-game output
 * Added memory and time stack to show proper stats for addons that call LoadAddOn while they are loading