tgstyle Posted April 2, 2025 Report Posted April 2, 2025 (edited) Place this file in the folder where you installed Vintage Story (same folder as Vintagestory.exe), and remove the .txt extension so it is just called "app.config" (no quotes). I have been testing the change to .Net Garbage Collection with success. The GC pauses are pretty much entirely removed. This is also useful on heavily modded games and also works on Servers. app.config.txt As noted with the posts below, the file is not malicious and is valid for a .Net application like Vintage Story. Try it out if you have intermittent GC pauses in Single or Multiplayer. Edited April 3, 2025 by tgstyle 1
idiomcritter Posted April 2, 2025 Report Posted April 2, 2025 welcome to the forum @tgstyle for reference, the content within the file: <configuration> <runtime> <gcServer enabled="true"/> <gcConcurrent enabled="true"/> </runtime> </configuration> 1
Broccoli Clock Posted April 3, 2025 Report Posted April 3, 2025 (edited) 13 hours ago, tgstyle said: Place this file in the folder where you installed Vintage Story (same folder as Vintagestory.exe), and remove the .txt extension so it is just called "app.config" (no quotes). I have been testing the change to .Net Garbage Collection with success. The GC pauses are pretty much entirely removed. This is also useful on heavily modded games and also works on Servers. app.config.txt 142 B · 5 downloads Interesting and geeky. Do you plan on posting those results of the tests you did? Personally I don't notice intermittent lag spikes that could signal the default GC in action, nor do I experience memory leaks (and I have the game sitting out of focus for hours, popping in and out of it when I have time). That's SP though, with the need to create and destroy lots of objects being far more common in MP. Did you try this in a MP environment, and if so, was there a noticeable difference? One thing to note, we don't have visibility over the code base and we don't know what is going on "under the hood" as it were. There are many ways to deal with GC, and not just explicitly. We don't know if the devs have done anything specific regarding memory management inside the code, and the config tends to be for compiling and runtime configurations (like moving from dev to prod). That said, what is in the config isn't going to break anything, and it may help some people on low memory or a lower spec PC that could get spikes from GC in operation. 12 hours ago, idiomcritter said: welcome to the forum @tgstyle for reference, the content within the file: <configuration> <runtime> <gcServer enabled="true"/> <gcConcurrent enabled="true"/> </runtime> </configuration> Thank you, and @tgstyle you should know to provide more than just a file and say "drop it into your folder". Even if the settings are pretty benign, providing a malicious config is definitely possible. Which is why you should provide a plain text output along with the file. -- as this is a geeky subject (thankfully we aren't working in C/C++!) here's some further reading for anyone interested in what gcServer/gcConcurrent actually do -- [MSND] - Fundamentals of garbage collection [MSDN] - Memory management and garbage collection (GC) in ASP.NET Core [MSDN] - Analyze memory usage in release builds (C#, Visual Basic, C++, F#) Edited April 3, 2025 by Broccoli Clock
tgstyle Posted April 3, 2025 Author Report Posted April 3, 2025 9 hours ago, Broccoli Clock said: Did you try this in a MP environment, and if so, was there a noticeable difference? Yes, I have a server with several players and this fixed the pauses for many of those players. Of course this is modded Vintage Story which adds a lot more content and uses way more memory than the base game. 9 hours ago, Broccoli Clock said: Thank you, and @tgstyle you should know to provide more than just a file and say "drop it into your folder". I would have but @idiomcritter beat me too it. I can only speak for myself, I don't believe in being malicious. However, the internet is full of bad actors and gets exhausting so I understand completely. 1
tgstyle Posted April 3, 2025 Author Report Posted April 3, 2025 9 hours ago, Broccoli Clock said: That said, what is in the config isn't going to break anything, and it may help some people on low memory or a lower spec PC that could get spikes from GC in operation. One additional item to add to this, this works on higher end PCs as well. I have a 7900X3D paired with 64GB of RAM and a 7900XTX (should play as smooth as can be but this is not the case). The modded game we play can utilize 9-14GB when loaded in to the world, with much higher usage over time (suspected memory leaks from mods). This helped the game play much better and longer for several players. 1
Dilan Rona Posted April 5, 2025 Report Posted April 5, 2025 Will be giving this a try. Got 8Gb memory, and a heavily modded game (86 mods last count). So I do have that problem of the occational lag spike.
xXx_Ape_xXx Posted April 5, 2025 Report Posted April 5, 2025 (edited) This is client side only? Note to self: Learn to read! Edited April 5, 2025 by xXx_Ape_xXx
Recommended Posts