-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement - move calls to Game.SaveGameStats into Jobs #5929
Comments
So I was going to yell for help, but I managed to work it out. Possibly more convolutedly than required.. My draft implementation can be found in #5934 In this implementation, the individual stutters are gone, instead there is one huge long stutter, and the interface updates all at once instead of entry by entry as currently. Perhaps I misunderstood and the Lua Events should be triggered from inside each job, but I have no idea how threadsafe the C++ / Lua interface is.. |
...and a very quick test shows that no, it is not threadsafe and blows up. |
Yeah current master branch crashes when I go to the system view. |
Info: Created shader geosphere_terrain (address=0x562de39d9cd0) |
... that's completely unrelated to this work (but the crash does look like it's related to my other PR #5922) .. I can't repro this crash (master on commit 770ed87 - 20 or so hours ago) |
sorry it seems to work now maybe was a save game bug or something after recompiling it seems to be resolved on a new game. |
No worries; but please do not comment in completely unrelated issues... |
Follow-up to #5927; details in this discussion.
Web-eWorks:
Something you might consider for a follow-on PR - data/pigui/modules/saveloadgame.lua calls Game.SaveGameStats repeatedly to load details about savefiles on disk. That function should* be able to be moved off-thread using the Job system (finalizing the job and delivering the result via LuaEvent on the main thread) so there isn't a perceptual hitch/stutter when enumerating details about saved games.
That's the equivalent of throwing you in the deep end to see if you can swim, so feel free to demur and I'll tackle it when I get time.
The text was updated successfully, but these errors were encountered: