Cubyz icon indicating copy to clipboard operation
Cubyz copied to clipboard

Show performance of threadpool tasks

Open archbirdplus opened this issue 1 year ago • 8 comments
trafficstars

Preferably split it up as well:

  • chunkgen
  • lighting
  • whatever else

This would help optimizations.

archbirdplus avatar Jun 02 '24 21:06 archbirdplus

What exactly would this show? Average time spent?

IntegratedQuantum avatar Jun 03 '24 09:06 IntegratedQuantum

Average time per task would be useful for optimizing the tasks. Total time would help identify cpu vs gpu performance issues.

archbirdplus avatar Jun 03 '24 15:06 archbirdplus

Here's what I have so far. The µs/task stat is actually quite stable even without any averaging. image

archbirdplus avatar Jun 03 '24 22:06 archbirdplus

Honestly, 1 millisecond per 32^3 is kind of ridiculous.

archbirdplus avatar Jun 03 '24 22:06 archbirdplus

Yeah, and keep in mind there is two tasks per chunk, one for lighting/meshing and one for generation. I think lighting takes a big chunk of that combined time. That's why it might be more interesting to see the time per task. Maybe we can add a getTaskId to the VTable to handle these?

IntegratedQuantum avatar Jun 04 '24 07:06 IntegratedQuantum

My plan was just enum TaskClass.

archbirdplus avatar Jun 04 '24 07:06 archbirdplus

Wouldn't this make adding new tasks more difficult?

IntegratedQuantum avatar Jun 04 '24 07:06 IntegratedQuantum

Findings: image This is the version I am making a PR for.

archbirdplus avatar Jun 04 '24 23:06 archbirdplus

fixed by #445

IntegratedQuantum avatar Nov 24 '24 20:11 IntegratedQuantum