Skip to content

performance bottleneck with high number of renderable entities #354

@MegasKomnenos

Description

@MegasKomnenos

hi, I'm that guy few days ago who created 40,000 entities and received a horrible lag. I tried to use profiling to see where the bottleneck is, and this is what I got
most of the systems handle large entity size quite well, but some parts don't seem to scale very well
rendering is where it's most noticeable, and within rendering, there are 3 parts that eat up the performance quite noticeably
with Core: 309.063
and Render: 308.945,
Determine visibility: 15.7901
Render view: 209.513
and Swap buffers: 27.4211
among them, I took a deeper look into Render view, and nearly all of it is from Compositor
where Compositor: 209.497
taking a deeper look, most of Compositor is from Base Pass
where RC: BasePass 185.662
within BasePass, there are 2 bottlenecks

https://discordapp.com/channels/572359664528916490/572359664528916492/592612280265343008

and

https://discordapp.com/channels/572359664528916490/572359664528916492/592612365711704083

this part
where

https://discordapp.com/channels/572359664528916490/572359664528916492/592612444170485780

the first bottleneck was something around 40, I think
while the second was around 150
I was able to serialize the first bottleneck using taskflow's parallel_for
but when I tried the same thing with the second bottleneck, the game crashed
which I guess makes sense
I think if those two bottlenecks can somehow gain improved performance
than rendering multiple entities would be more feasible

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: performanceSystem is functionally working properly but not performing as well as it could be

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions