Performant way to access config data for all entities

I am learning Dots and want to implement a very performant way for a System to use static config data.
For each Entity parallelized jobs should access the static config data.
Can the config data permanently stay on the cache?

Should I use:

  • ChunkComponentData
  • BlobAsset
  • a DataComponent for each entity
  • something else?

Would love some input.

1 Like

Simply put your config data in a singleton component, then pass the singleton to your jobs. I guess you could also use shared statics, but I’m not sure if that’s a good practice.

It will probably move around between L1, L2 and L3 cache as needed. I wouldn’t worry about it until it becomes a problem.

1 Like

Does SharedStatic impose write rules when mutated in multiple threads?

I think it works similar to regular C# statics when it comes to multithreading (no race condition protection, etc).