-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
enhancementaccepted requests, sooner or later I'll do itaccepted requests, sooner or later I'll do it
Description
Hi,
First of all, thanks for this awesome lib. We're building an engine on top of it and it's going great.
There is one issue that is bugging me while profiling: clearing a storage with tens of thousands of components is very slow. Like 1.37ms for 60K entities, which is comparable to computing and adding those components in the first place.
The component in question is a POD with no destructor:
struct VisibilityStats
{
float cameraDistanceSq = 0;
float screenRatioSq = 0;
Lod lod = k_bestLod;
};I've seen that the pop_all function which seems to do all the work goes item by item to destroy the components, but it also swaps and pops, which seems unnecessary? After all, we're clearing, so that seems like something that can be skipped.
I'm still familiarizing myself with the code though, so maybe I missed something.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementaccepted requests, sooner or later I'll do itaccepted requests, sooner or later I'll do it