Quantcast WoWInterface - View Single Post - Addon settings take excessive amount of time/syscalls
View Single Post
11-27-16, 11:14 AM   #1
Infus
A Deviate Faerie Dragon
Join Date: Jul 2016
Posts: 13
Addon settings take excessive amount of time/syscalls

TLDR: WoW uses ~600.000 WriteFile calls to write a 3MB settings file and that takes 9s. That is a order of magnitude slower than it needs to be.

I took a look at how World of Warcraft saves addon settings with Microsoft's Process Monitor: https://technet.microsoft.com/de-de/...ssmonitor.aspx

I've uploaded screenshots of a typical run to: http://imgur.com/a/qCs3w What you see there is every call that matches a filter on WeakAuras.lua. So, this is for only one file, though the file is 3.5 MB big.

As you can see in the bottom left 619.611 events match the filter, almost all of them calls to WriteFile.

By comparing the time of day between the initial CreateFile and the CloseFile, you can see that writing the file took 9s.

In 6. column, the details of each WriteFile call show that each WriteFile call is passed between 2 and ~15 bytes. On average each call is only passed 6 bytes.

This is obviously bad, saving a 3MB settings file shouldn't take longer than 1 second, nor take 600.000 calls to WriteFile.

Also we do get frequent reports of users loosing their WeakAuras settings if WoW crashes, we think this can only happen if WoW is at that moment writing the settings file.