BigCityPerformance
Reduces large-city stutter: off-thread pathfinding, spread-out per-frame work, adaptive object streaming, and prompt interior loading. Auto-adapts to very large cities. No visual change; it does not fully eliminate stutter.
By kropath
| Last updated | 3 months ago |
| Total downloads | 372 |
| Total rating | 0 |
| Categories | Mods Tools Misc Patch |
| Dependency string | kropath-BigCityPerformance-1.2.0 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
BepInEx-BepInExPack_IL2CPP
BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.
Preferred version: 6.0.755README
Big City Performance
A performance mod for Shadows of Doubt that reduces stutter in larger cities. It moves some of the game's heavy work off the main thread and spreads other work out across frames, so the big pauses that make the game hitch happen far less often. It does not change how the game looks or how it plays.
What to expect, and what not to
This mod targets stutter, not frame rate. Shadows of Doubt simulates a whole city of citizens all the time, and in a large city that work occasionally piles up into a single frame and causes a freeze or a hiccup. This mod smooths those out. It will not raise your average frame rate, and it will not turn a struggling machine into a fast one. If your game is slow everywhere rather than hitching now and then, this is not the fix for that.
It also does not solve stutter completely, and it is honest to say so. Some of the remaining pauses live deep in the game engine and the rendering pipeline, which a mod simply cannot reach. What this mod does is remove the kinds of stutter that come from the city simulation, and those are the most frequent and the most irritating ones.
Measured example
These numbers come from playing the same large city with no mods, then with this mod, and counting how often each kind of stutter happens. They are averaged over long captures (more than ten thousand frames each), so they are steady rather than cherry-picked, though your own numbers will vary with city size, hardware, and what you are doing.
The rates below are per one thousand frames of play, which is roughly twenty seconds.
| Per 1000 frames | Vanilla | With this mod |
|---|---|---|
| Average frame rate | about 41 fps | about 41 fps |
| Long pathfinding freezes (over 200 ms) | 1.1 | 0.1 |
| Recurring update hitches (40 to 90 ms) | 6.3 | 0 |
| Garbage collection pauses | 3.1 | 1.4 |
In plain terms: the long freezes drop by around ninety percent, the recurring hitches essentially disappear, and garbage collection pauses are cut by more than half, all without changing the average frame rate. A few long pathfinding freezes still slip through, because a single very long route cannot be split up, and that is the kind of limit described above.
One honest note. The total count of tiny stutters (the small sub-100 ms ones) barely changes, because a lot of those come from the game engine and the renderer, which a mod cannot reach. What this mod removes is the big and the frequent stutters, which are the ones you actually feel. It makes a large city noticeably smoother; it does not make it perfectly smooth.
What each fix does
All of these are on by default and can be turned off individually in the config file.
Off-thread street pathfinding. When citizens work out a route across the city, the game normally does that math on the main thread, so a burst of citizens all routing at once freezes the frame. This runs that work on background worker threads instead, alongside the game rather than blocking it. This is the single biggest improvement. Citizens may occasionally take a slightly different but equally valid route, which you will not notice.
Spread-out offscreen citizen updates. Several times a second the game updates every offscreen citizen in one burst, and in a big city that burst is a visible hitch. This spreads the same work across several frames. Only offscreen citizens are affected and all of their timing is preserved, so nothing behaves differently.
Path request smoothing. When a crowd of offscreen citizens all ask for a new route in the same frame, this holds some of those requests back for a frame or two so they do not stack into one long freeze. The game already lets a citizen wait a moment for a path, so there is no visible effect, and anyone you can see always routes instantly.
Larger room cache. Big-city streets can show more than a hundred rooms at once, and the game keeps unloading and reloading room interiors as you move, which hitches. This keeps more of them loaded. It trades some memory (very roughly half a gigabyte) for fewer of those hitches.
New in this version:
Adaptive streaming. As you move, the game streams in the objects and furniture around you a little at a time, and on a busy machine that can add small hitches to frames that are already slow. This eases the streaming off only on frames that are already running slow and keeps it at full speed the rest of the time, so busy areas feel smoother. On a frame that is already slow a nearby object or piece of furniture may fade in a moment later; on a normal frame there is no delay. See the note below on what you may notice.
Prompt interior loading. When you enter a room, its furniture and objects now appear right away instead of trickling in over several seconds. The base game only refreshes what a room shows when you cross a doorway or on a slow timer, so standing still just inside a room could leave it half empty for a while, and the larger room cache made that more noticeable. This loads the room you are standing in promptly and fully, still spread across frames so it does not cause a hitch, and only for the room you are actually in.
What you may notice while playing
These two changes are the only ones you can actually see, and both are deliberate.
Objects and furniture on the street can appear a moment later. When you are outdoors and the frame is already busy, the mod eases off streaming for a beat so that busy frame stays smooth, then catches up. In a large, crowded area this can mean a nearby object or a piece of street furniture fades in a second or two later than it would in the base game. It is an intentional trade: a slightly later fade-in in exchange for far fewer hitches while you move. On a frame that is running fine, streaming stays at full speed and there is no delay.
Rooms you enter load right away. The moment you step into a room, the mod loads everything in it first, so its furniture and objects are there almost immediately instead of trickling in over several seconds. This is the opposite of the street behavior above, and on purpose: the room you are standing in is the one you care about, so it is loaded first and in full while the street around you can wait a beat.
If you would rather have the base game's exact timing, each behavior has its own switch in the config (Adaptive streaming and Current room priority), and turning them off restores the original loading.
On extremely large custom cities (roughly nine thousand rooms or more, which is far above any standard city), the mod automatically turns both of these prompt-loading behaviors off. At that scale they add more small hitches while you walk than they are worth, so switching them off keeps the streets as smooth as possible while interiors fill in gradually like in the base game. Everything else stays on. This is handled for you and needs no attention, but it can be adjusted or turned off under AutoTune in the config.
Where it helps most
- Large and huge cities, where the simulation load is highest.
- Walking through busy districts, where lots of citizens are on the move and constantly re-routing.
- Machines that are held back by the processor rather than the graphics card, which is the usual case for this game.
Smaller cities already run fairly smoothly, so you will see less of a difference there. It will not hurt anything on a small city.
Compatibility
This mod only changes timing and threading inside the city simulation. It does not touch save files, gameplay rules, cases, what citizens decide to do, or anything you interact with. It runs happily alongside other mods, including gameplay mods, and every change is wrapped so that a problem in the mod cannot crash your game. If you ever want to rule it out, each fix has its own switch in the config.
One exception: turn this mod off while using the city editor. It is a play-time performance mod that changes how the city streams and loads objects, and that can interfere with editing a city. Disable it while you build or edit a city, and turn it back on when you go back to playing. This is a known limitation that will be looked at in a future update.
Requirements
- The BepInEx IL2CPP pack, listed as a dependency.
- Keep the game on its current version. The mod is built against the live game build.
Config
A config file is created the first time you run the game with the mod installed, at BepInEx/config/Kropath.BigCityPerformance.cfg. Every fix is on by default. Each has a short description in the file, along with a couple of tuning values if you want to trade smoothness against how often offscreen citizens update. The AutoTune section at the top controls the automatic large-city behavior described above, including the room count at which it kicks in.