#System has outsized effect on frame time

1 messages · Page 1 of 1 (latest)

astral tartan
#

Hello! I have a system that is taking a long time to run. I expected it to be one of my longest running systems but not this long!

When I run a barebones version of my app without the system I get frame times around 0.5ms. With the system frame time is around 20ms.
I set up a benchmark test to run the system in isolation. In each iteration of this test I get a query from the world, run the system and update the app. In all this takes ~0.9ms/iteration.

What can explain this discrepancy? I realize these times are not directly comparable, but my intuition is that in the worst case this system would be run serially with the others, and therefore contribute approximately 1ms per frame. Even if the benchmark test was off by an order of magnitude that still explains only half of the effect on frame time.

clear dagger
#

Did you remember to compile in release mode?

astral tartan
#

I did.

final roost
#

Have you tried making the system exclusive? Maybe it's causing false sharing (competing for cache lines with other systems reading nearby data)