Havok very slow?

I am currently developing a tech demo and have been utilizing Havok since the start of the project, almost to the point of taking it for granted.

Recently, I reached a stage where I needed to dynamically add the velocity and mass component of certain entities to create physics. However, this change resulted in a significant performance drop. I add it to something between 500 to 5k entities.

Initially, I suspected an error on my part and attempted to identify the issue. Surprisingly, when I switched from Havok to Unity Physics, the performance issue was a lot better!

Is there a known issue with Havok at the moment? I am up-to-date with the latest DOTS package. Any insights or suggestions would be greatly appreciated.

The only thing I can think of (without knowing what you're trying to accomplish specifically) is that you may be creating some sort of sync point. Perhaps the order in which certain component's values are accessed and the physics Systems' dependencies differ between Havok and Unity's default implementation. That would mean a call to something like SystemAPI.Query (which synchronously completes all write operations to the components you're trying to access) could have more overhead and slow everything down significantly, especially if the system calling this function is ordered after the physics systems, since they would schedule these operations asynchronously in the form of jobs but then those jobs have to be completed immediately after, mostly on the main thread.
Again, total speculation on my end though. The best bet without any feedback from the Unity Devs would be to look at the profiler and see if any physics related jobs are being run right before your operations, and then compare that to how things execute when you don't modify or read from any components. (Maybe also try placing your System in a different System Group?)

Thank for the help. I disable all job when there is a PhysicsVelocity on the entities, so it can't be a job (or I think).

Switching to normal physics is like 10x faster. I have no idea yet why. I'll continue my investigation... I was hoping for something obvious like "oh yeah, there is a bug in the latest version of havok, we are going to patch soon".