Space Engineers

Space Engineers

Automated Inventory Sorting
Kiwa 2016 年 5 月 17 日 下午 2:27
Bug? serious lag spikes
Hello tyrsis,

I am having some serious lag spike problems with one of my worlds, and (unfortunately?) have pinpointed them to this mod. "/sort manual" takes about 8 seconds, and I have further nailed down the problem to the Moon Base. SpaceEngineers version is 01_134_007 Win-64, mod version is the latest greatest, the only other mod in use is a Laser Range mod which doesn't make a difference.

In the original game, the base is a bit larger, with a sizable solar array and a space "elevator" (really just an armor+conveyor tube) attached, but for reproduction purposes, those are not essential -- it can be reproduced with just the reduced size Moon Base. For simplicity, I have also removed most other assets from the save. With one Moon Base, it takes 2 seconds, and with the 3 clones it's about the same as the original game (8 seconds for one "/sort manual"). When automatic sorting is enabled ("/sort toggle"), the lag spikes I am observing are in the same order of magnitude, and when combined with the default interval, make playing almost impossible. I have already tried changing the priorities of the containers to be sequential instead of sharing the same priority for ore, but I think it didn't improve the situation - if anything, it just got worse.

savegame is published here: http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=686527066

Do you have any idea what might be going wrong? Do you need additional log files?

One hint my be that it actually also gets worse from simply attaching a long passive conveyor tube, i.e. no "active" parts like containers or sorters, just plain conveyors, so it looks like some... computation may not be scaling too well. And maybe something is computed too often (per sorted container instead of per ship -- the other base in the game, Asteroid Base, has a similar number of non-armor parts/conveyors but fewer containers with sort orders, and that one does not cause such long computation times.)


Best regards,
Kiwa
最后由 Kiwa 编辑于; 2016 年 5 月 17 日 下午 2:38
< >
正在显示第 1 - 6 条,共 6 条留言
Kiwa 2016 年 5 月 17 日 下午 2:51 
I tried posting a debug log to pastebin, but even the smallest "/sort manual" is already 2 MB, significantly above the pastebin limit :GrumpyLavie:
And the log from 3 minutes auto sorting (at the default interval 5) is about 8.8 MB :rfacepalm:
tyrsis  [开发者] 2016 年 5 月 17 日 下午 9:09 
Hmm Keen changed something with definitions and caused this super nasty little issue. Thanks for the save I will fix it.
tyrsis  [开发者] 2016 年 5 月 17 日 下午 11:05 
I fixed it a lot, but I'm still not completely happy. Please note that /sort manual happens in the main thread, where as /sort toggle will occur in the background and shouldn't effect sim speed like manual does. Give it a try and see if it helps. For me it didn't touch my sim speed at all after the fixes.
Kiwa 2016 年 5 月 18 日 上午 12:32 
Hello tyrsis,

I can confirm the "/sort manual" is now down to about 800 ms, *much* better, thank you :)

Unfortunately I also still observe lag spikes. In the reduced save uploaded above they are only in the order of 2 seconds, but it seems the full save is suffering worse, there I counted one up to 23 seconds (to "measure" I tune up the sound volume and count the time the sound cuts out while sitting in the cockpit and reading a book).

Now, I'ld rather not openly publish the full save because other people have contributed to it, but I have uploaded it "friends only" here: http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=686716469 and will send you a friend invite so you can get access to it.

And as always, a big Thank You for all the work that's going into this mod. Many people including me would probably go crazy managing the inventories without it :freesia:
tyrsis  [开发者] 2016 年 5 月 20 日 下午 6:54 
I will take a look at it when I can.
Xarniia 2016 年 6 月 26 日 上午 12:28 
Because I always disable/enable the mod in game, why not the option to sort only („one cycle“) every game save or other timed interval. Perhaps even with pausing the game. This does not fix the performance issue but it makes the mod less clunky to use.
< >
正在显示第 1 - 6 条,共 6 条留言
每页显示数: 1530 50