23-02-2026, 02:23 PM
(23-02-2026, 01:00 PM)josemendez Wrote: That's 22 arrays and a few integers/floats, which totals around a bit more than 176 bytes (22*2*4 bytes), let's say 200. Copying 200 bytes is basically instant, should not even show up in a profiler. If your job is copying around larger structs (even if it looks smaller code-wise) then it will be slower to schedule. Note that schedule overhead also depends on other factors, not just struct size.
Yes, there are other factors and this what I tried to find out. Just for reference my struct below.
Obviously with debugger disabled this difference is not so huge, but still it's interesting what factors cause those gaps.
Code:
[ReadOnly] public NativeArray<int> indices;
[NativeDisableParallelForRestriction] public NativeArray<float4> positions;
[WriteOnly] public NativeArray<float4> endPositions;
[NativeDisableParallelForRestriction] public NativeArray<quaternion> orientations;
[NativeDisableParallelForRestriction] public NativeArray<float> invMasses;
[WriteOnly] public NativeArray<float4> deltas;
public int2 constrainedRange;
public float segmentLength;
public float oOffset;
public float dt;
[ReadOnly, NativeDisableParallelForRestriction] public NativeArray<int> targetIndices;
public float targetTotalLength;
public int targetCount;(23-02-2026, 01:00 PM)josemendez Wrote: There's a button for this: you can find it in either Jobs->Jobs debugger or in Preferences->Jobs->Enable Jobs Debugger.I think Jobs->Jobs debugger is available only with entities package, but prefereces works, thanks!
(23-02-2026, 01:00 PM)josemendez Wrote: Not currently, since other jobs depend on it (including, but not limited to fluids). For Obi 8 I'm aiming to remove all Complete() calls mid-step.Got it, great!
Thank you, have a great day!

