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

vertices and indices out param support #4

Closed
whiterabbit42k opened this issue Dec 9, 2020 · 3 comments
Closed

vertices and indices out param support #4

whiterabbit42k opened this issue Dec 9, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@whiterabbit42k
Copy link
Contributor

So my usecase is currently a semi-realtime meshing of fluids from salva; for around 1k particles, I'm able to mesh about every 30-60ms.

As apart of perf investigations, I'm wondering if we can reduce some of this overhead by providing a vertices and indices out param, perhaps something like:

splashsurf_lib::reconstruct_surface_with(&positions, &params, &mut vertices, &mut indices)

This should reduce some pressure on the allocator?

@w1th0utnam3
Copy link
Member

So your idea would be to basically call .clear() on them and just reuse the reserved capacity? Maybe you can try it out to see how this affects performance in your case. I would be open to merge it.

@whiterabbit42k
Copy link
Contributor Author

I have a patch doing this which does not change the current api; i can push it. Yea so with out params like that the idea is that you only get the allocation hit once or twice so memory use becomes stable after running for a while (it keeps writing into same heap storage)

@whiterabbit42k
Copy link
Contributor Author

done in #7

@w1th0utnam3 w1th0utnam3 added the enhancement New feature or request label Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants