TekkaGB / AemulusModManager

GNU General Public License v3.0
79 stars 20 forks source link

Replaced Console.Write calls with Parallel Logger Utility. #72

Closed Jai-2001 closed 1 year ago

Jai-2001 commented 1 year ago

Functions with high numbers of logged messages were causing bottlenecks by blocking until each message was printed, this fork implements a utility class to push these messages to another thread, freeing file operations from being bound by console IO.

TekkaGB commented 1 year ago

Tried out this pr but it just made Aemulus much laggier, thus I deleted these changes that were previously merged

Jai-2001 commented 1 year ago

Could you elaborate as to where this discovered lag would have been found?

Testing the run time for building and merging has shown for me a considerable increase in performance, this build includes a version of P3HD overhaul for which the prior versions have suffered the greatest slow-down: MOD_LIST

Build time on the debug build of the fork: FORK_LATEST_DEBUG

Build time on the release version of the fork: FORK_LATEST_RELEASE

Build time on the release of master made before the fix: MASTER_LATEST_RELEASE

Additionally, the new logging system did solve a bug in the application, where the window would freeze and potentially cause a not responding dialogue to appear, caused by massive batches of print calls occurring in the GUI thread.

vim449 commented 1 year ago

The second commit in this fork also fixes an issue that has been affected a chunk of P3 mods in which it became impossible to make use of GB's 1-click install because aemulus wouldn't be able to extract the mod correctly.

TekkaGB commented 1 year ago

@Jai-2001 For me as can be seen here, Aemulus won't even make it pass initialization and my cpu temps were getting really high.

https://user-images.githubusercontent.com/70003922/221316650-54eeebc4-fc94-45a3-bc4f-847274a39b75.mp4

TekkaGB commented 1 year ago

I can remove the parallel logger and keep the path fix and it no longer freezes on me

Jai-2001 commented 1 year ago

The freeze and CPU spike should be fixed here.