Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instancing benchmark demo #586

Merged
merged 8 commits into from
Apr 30, 2024
Merged

Instancing benchmark demo #586

merged 8 commits into from
Apr 30, 2024

Conversation

smlpt
Copy link
Contributor

@smlpt smlpt commented Apr 21, 2024

This PR adds a benchmark to the Demo > Advanced menu.
It allows you to compare the conventional means of node publishing with instanced geometry, using spheres as objects.
The benchmark type can be run in four ways:

  • publish each node separately
  • publish all nodes cumulatively at the end
  • populate the scene with instanced geometry sequentially
  • populate the scene with instanced geometry using a parallel stream over the array, which is even faster

There are also parameters for the number of (instanced) particles (defaults to 1000) and the spread in each dimension.

@kephale
Copy link
Member

kephale commented Apr 22, 2024

One concern I have is that if a user doesn't know what to expect when running this, they could have a pretty bad time (e.g. if they run the addNode publish all with too many agents then it will get stuck).

Maybe some kind of warning in the Command dialog itself that they should be cautious, it could freeze their application, etc..

@smlpt
Copy link
Contributor Author

smlpt commented Apr 22, 2024

That's a good point.
I added a label with approximate timings:

image

@kephale
Copy link
Member

kephale commented Apr 22, 2024

The last requests would be:

  • mentioning this benchmark in the docs like @ctrueden suggested
  • add a Gradle usage example in the docs

@smlpt
Copy link
Contributor Author

smlpt commented Apr 23, 2024

Added a benchmarking page to the docs and registered a gradle task to run the benchmark from a CLI.

Copy link
Member

@skalarproduktraum skalarproduktraum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor things, otherwise great contribution! Thanks @smlpt 👍

@smlpt
Copy link
Contributor Author

smlpt commented Apr 23, 2024

@skalarproduktraum done 👍

Copy link
Member

@skalarproduktraum skalarproduktraum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @smlpt 👍

@skalarproduktraum skalarproduktraum merged commit 1138b65 into main Apr 30, 2024
3 of 4 checks passed
@skalarproduktraum skalarproduktraum deleted the particledemo-benchmark branch April 30, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants