This is a technical mod to help diagnose and triage performance problems in other mods.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are not allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
Special thanks to Pathoschild, Spacechase0 and others in the discord helping with Harmony patching.
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
The original feature was simple logging whenever important gameloop milestones happened, logging the time since mod initialization (both as the first handler and last, measuring time taken by all mods): 1. "GameLaunched" fires 2. "LoadStagechanged" fires (for all the intermediate lifecycles) 3. "SaveLoaded" fires 4. "DayStarted" fires
The main feature is logging individual event handlers whenever they pass a individual time threshold (defaulted to 10ms, adjustable in config), along with the entire event taking an additional time threshold (defaulted to 100ms) and logging the time taken for every handler for the given event.
New in 2.0 is building logical stack traces showing the stack of nested events when things exceed the timing thresholds in config, along with Content Pack support and API's to add additional event types on any C# function along with collecting optional details to add context.
In addition, I have built a website which entirely locally in the browser can parse SMAPI Logs and when Profiler2 is present unlocks visualizations to show the breakdown of what Profiler has logged and where certain performance spikes exist. The website will be updated in future with more features and better visualizations Stardew Utilities - SinZ (361zn.is)