View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0024697 | AI War 2 | Suggestion | Apr 16, 2021 9:47 am | Feb 24, 2022 10:52 am | |
Reporter | Chris_McElligottPark | Assigned To | Chris_McElligottPark | ||
Status | resolved | Resolution | fixed | ||
Product Version | 2.801 Initial Hotfixes | ||||
Summary | 0024697: For the future: remove short term and long term thread planning data copies. | ||||
Description | I keep thinking of this, and keep forgetting about it, so I'm writing it down. This is going to cause nontrivial amounts of new and intermittent cross-threading bugs when I do it, so it will have to be on a beta branch. But there's a solid chance that this will up the performance of the simulation pretty dramatically. Right now, before any "short term planning" happens (aka, the background threads that are part of a sim step every 100ms), a bunch of stuff gets copied to some working variables. When all of them are finished, certain results get copied back. This was done in the name of thread safety, and to try to have deterministic threading (years ago, back before we abandoned that concept). By removing these intermediate variables, I can cut down dramatically on two sim-thread events that I know from past profiling take up quite nontrivial amounts of CPU time. The long-term-planning stuff is more intermittent, but I think also still problematic. It may not need to be removed, but I need to look at it. It's for the various factions doing their on-host long term planning logic, and I don't remember exactly what is in there, but I don't think its actually needed. A vast majority of what those threads use actually goes AROUND these long-term planning variables, which is why these are not all that noteworthy. In some respects, they may actually be less prone to errors from changing this, since they already at least partially ignore it. Nonetheless, all those extra variable copies back and forth are not something I want to have in there if it might be slowing things down. Something for post-DLC2, when I can do a beta period for a few weeks at minimum. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
Apr 16, 2021 9:47 am | Chris_McElligottPark | New Issue | |
Apr 16, 2021 9:47 am | Chris_McElligottPark | Status | new => assigned |
Apr 16, 2021 9:47 am | Chris_McElligottPark | Assigned To | => Chris_McElligottPark |
Feb 22, 2022 7:47 pm | ZeusAlmighty | Relationship added | related to 0026495 |
Feb 22, 2022 7:48 pm | ZeusAlmighty | Relationship deleted | related to 0026495 |
Feb 22, 2022 8:57 pm | BadgerBadger | Note Added: 0064734 | |
Feb 24, 2022 10:52 am | Chris_McElligottPark | Status | assigned => resolved |
Feb 24, 2022 10:52 am | Chris_McElligottPark | Resolution | open => fixed |
Feb 24, 2022 10:52 am | Chris_McElligottPark | Note Added: 0064798 |