bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.29k stars 3.58k forks source link

Add simple benchmarks for asset loading #3433

Open alice-i-cecile opened 2 years ago

alice-i-cecile commented 2 years ago

What problem does this solve or what need does it fill?

Asset loading speed is important for user experience, even if

What solution would you like?

Add benchmarks for loading each supported type of asset.

Additional context

ogg seems to be particularly slow to load.

As we replace and modify our audio and asset parts of the engine, having even simple benchmarks will give us a sense of where we need to focus improvements, and if the changes we make are helpful.

DraftedDev commented 2 years ago

Do you mean stress tests (examples/stress_tests) or benches (benches/benches) ???

alice-i-cecile commented 2 years ago

Benches :) I'd like to have reproducible performance numbers for how long it takes to load assets and scenes, to see the impact of changes.

mockersf commented 2 years ago

Scenes and gltf assets make sense to benchmark in Bevy, for most other asset kinds Bevy does very little work and it would mean benchmarking a third party library

alice-i-cecile commented 2 years ago

Yep, scenes, gltfs and maybe a very simple data format with a custom asset loader just to try and measure raw overhead.

richchurcher commented 2 months ago

This sounds quite interesting. I wonder how you take media speed out of the equation though :thinking:

richchurcher commented 2 months ago

I guess you could use an in-memory store...

alice-i-cecile commented 2 months ago

I actually think that media speed is valuable to leave in here: if our benchmarks are absolutely dominated by disk read times, then that's useful game-relevant information to make decisions by!

As long as we can compare times between two consecutive runs on the same machine, that's fine.