WindowResizer
WindowResizer copied to clipboard
Optimization: SaveAll writes config as many times as there are open windows
The SaveAll feature calls Save() every time for each window it locates. So if there's 25 windows to be saved, the app will call File.WriteAllBytes() 25 times, instead of building up the config file in memory (as it already does) and saving only once all is ready.
- TrayContext.cs:396 -
TrayContext.SaveAll()function, calling: - WindowUtils.cs:103 -
WindowUtils.UpdateOrSaveWindowSize()function, that calls: - WindowUtils.cs:276 - WindowUtils.UpdateOrSaveConfig() function, calling:
- ConfigFactory.cs:67 - ConfigFactory.Save() shamelessly calling
File.WriteAllBytes().