Print timestamp of running time (not world time)

Hello :slight_smile:
I’ve some heavy functions in my code and I’d love to improve its performance. It’s LineTracesSingleByObjectType which is called >100.000 times a tick.
Now I’d like to see if my ParallelFor really improves the performance.
How to print the current timestamp of the code running?
Also I tried to print some stuff before and after the For-Loop but it always gets printed at the same time, tho the World is moving really slow and the computationtime should be high between.

Hope you can help me out! :slight_smile:

You can use QUICK_SCOPE_CYCLE_COUNTER and get time values in the UE4 profiler.

However, 100K Ray traces is never going to be performant. Even if you Async query them, that’s just a TON of work for PhysX to handle. If this is a meant for realtime, you may want to look at a compute shader or finding a way to better cull out objects before you attempt to fire a ray.

I know that it really lacks speed. I’m at ~70k in realtime. My goal would be 5 million… is this somehow possible, of course putting a lot of work in it?

At 30/60FPS? For a server farm? Sure. For your average PC? Absolutely not. Like I said, you’d have to get clever and devise some compute shader that fakes your ray trace but still gives you the data you want.