- User Since
- May 10 2022, 1:35 AM (19 w, 4 d)
Thu, Sep 15
No worries, do you need me to upload again?
Tue, Sep 13
Added time units (seconds, milliseconds) to variable names.
Sat, Aug 27
Space after if.
Fri, Aug 26
changed 1 to 1u, updated copyright year.
Aug 21 2022
Removed m_LastGCTime, changed a comment, added gcInProgress.
Aug 18 2022
What about the comment on timer_Time?
changed some int to u32
Didn't mean to submit yet, diff isn't ready, sorry.
Not a problem at all, I appreciate the time you put in to get it right :)
Aug 15 2022
uint32_t changed to u32.
Ok, that's another task to add to the to-do list then. It should give a significant result in terms of graphics smoothness as well as freeing up some more time for simulation to run.
Since the patch is about timing i don't see how to test it without introducing a race condition.
uint32_t changed to u32
Aug 14 2022
Add some includes, use timer_Time.
Reduce simulation thread load by ~10% (maybe a bit less, can't think of a way to test) and network traffic by 10-18%, depending on player APM. 500ms indeed sounds like too much. But 200 might have been an over-correction. The difference from 2 turns per second to 5 turns per second is ~1/3 second, but the difference between 5 and 4 is 1/20 second. I think this is small enough to not make a big difference.
Aug 13 2022
Changed type of gcPressure to double, changed type of gcBytes and gcMaxBytes to uint32_t, as well as m_HeapGrowthBytesGCTrigger and m_LastGCBytes. Added some const. Edited some comments.
Slice runs fewer times because it's time budget is typically higher. The total amount of RAM consumed should remain the same.
Replaced the constant 200 with the variable turnLength in Simulation2.cpp. Edited comment.
Space after if.
Copyright year, trailing white space, comment format.
Aug 12 2022
Use range based loop in graphics/mapWriter.cpp
Aug 10 2022
No I haven't tested multiplayer.
Formatting, range based looping, avoid stack allocation in Game::IsFinished.
Aug 9 2022
I haven't deeply read the code for source/lib/allocators/* or the code which uses them so I don't know.
changed range based loop to std::for_each in destructor.
Aug 8 2022
@Stan some of it will be coming from avoiding unnecessary copying, passing by reference. The theoretical complexity cost of removing the capacity limit is negligible. I would want to do more runs and average them together before I trusted that number to mean anything beyond that it hasn't gotten any worse. But I'm too tired to do that right now.
@Stan %12.7 👍 (based off one run)
Hello @jprahman, thank you for your help! I think there is more performance to be found, some in network and some in SpiderMonkey GC. Hopefully some more in territory calculations. After those we may want to try multi-threading. A lagless TG might be possible :)
Added more tests, made ComponentDataHolder::Pools return a reference, renamed AllocFunc to ConstructFunc, use for_each in ComponentDataHolder::Destruct, use range based loop in ComponentManager::ResetState.
Jul 28 2022
version control fail.
Changed uint_32 types for vector indices to size_t. Supposedly the type should be std::vector<std::byte*>>::size_type, but I haven't been able to get that to work.
More specific names and types, use for_each in CComponentDataHolder::ResetState.
Jul 26 2022
Changed the data type of SComponentDataGenerator::m_LastIndex from bool to uint_32,
Previous upload was a mistake, this one is better hopefully.
Allocator is now able to expand to arbitrary capacity.
Jul 6 2022
Formated some comments.
Jul 5 2022
reworked CGame::IsGameFinished, mostly changed it back to it was before. Seems like a dependency injection issue.
Jul 4 2022
Jul 3 2022
Added a test file.
Standardized instance of SComponentDataGenerator names to 'gen'.
Renamed some instances of the ordered list given by GetComponentsByInterface from ents to comps.
Changed ComponentType.dealloc to ComponentType.destruct.
Changed type name of ComponentType.dealloc from DeallocFunc to DestructFunc.
Jul 2 2022
Renamed GetEntitiesWithInterface to GetComponentsByInterface and GetEntitiesWithInterfaceUnordered to GetComponentsByInterfaceUnordered.
Jun 30 2022
Fixed broken upload from yesterday. Sorry.
Jun 29 2022
std::byte* instead of void*. Explicit keyword on SComponentDataGenerator constructor.
Jun 28 2022
I haven't tested multiplayer or rejoin, Ill have to dig up my old laptop.
Jun 27 2022
On Combat Demo Huge I see a 4% improvement vs. main. This is kinda a worst case scenario for this code since we have a single peak that trails off rather then the multiple peaks and valleys pattern it was written for.
Added spaces after where and for.
Ah, ok! Ill implement the average and total code inside prolfile2 instead then.
Profile2 as i understand it is for seeing the performance of a running game in real time. This is an alternative to graph.html and graph.js as used in simulation replay mode.
Jun 26 2022
Jun 25 2022
Moved CComponentDataHolder and SComponentDataGenerator from heap to stack. Added alignment.
Jun 22 2022
Jun 21 2022
May 13 2022
formatting whitespace, change some let to const.
Default arguments for EjectOrKill, removed VIM from .gitignore