#IJobParallelForTransform schedule batch size?

1 messages · Page 1 of 1 (latest)

spare sentinel
#

Why is there no way to specify batch size when scheduling IJobParallelForTransform?
Is it handled automatically? Is it more performant? Why doesn't other job schedule handle this automatically as well?

Is IJobParallelForTransform faster than calculating final position and rotation of the object, and later applying it manually?
What's the advantage over IJobParallel and applying the output final pos/rot manually?

Thanks!

junior walrus
#

it's single threaded job

#

it runs on worker thread, but it has to run only on one

#

thus it's done in one go

#

and no split on batches

#

this is probably due to internal structure of transforms which are stored on C++ side of engine and can't be easily resolved in parallel

spare sentinel
split thunder
junior walrus
#

🤔

split thunder
#

As long as you have different root gameobjects

junior walrus
#

I don't believe it has ScheduleParallel

#

and in profiler it was always just 1 job

#

not split through workers

split thunder
#

It doesn't because it's old and they never updated naming

#

When they standardized them

split thunder
#

It can only split by root game object

junior walrus
#

it was companion system

#

interesting

#

I didn't know that

split thunder
#

If you put all your gameobjects under the same root it'll run only 1 instance

#

Which is annoying because it's convenient for organisation

spare sentinel
#

So simply put, is it better for performance to always use IJobParallelForTransform when it will involve get/set transform in the end?

split thunder
#

it's probably not worth it if you're writing to like 1 transform

spare sentinel
#

Its used for hundreds of bullets in a bullet hell game.
Need it to be as optimized as possible because it is the main focus of the game. Currently using IJobParallelFor instead.

split thunder
#

bullets sound like the perfect candidates for entities

#

but yes if you have 100s then yes you should see benefits from it

spare sentinel
#

And it doesn't split the job across workers

split thunder
#

well it does all the work in a separate thread