# Objective - While optimising many_cubes, I noticed that all material handles are extracted regardless of whether the entity to which the handle belongs is visible or not. As such >100k handles are extracted when only <20k are visible. ## Solution - Only extract material handles of visible entities. - This improves `many_cubes -- sphere` from ~42fps to ~48fps. It reduces not only the extraction time but also system commands time. `Handle<StandardMaterial>` extraction and its system commands went from 0.522ms + 3.710ms respectively, to 0.267ms + 0.227ms an 88% reduction for this system for this case. It's very view dependent but... |
||
|---|---|---|
| .. | ||
| mesh2d | ||
| render | ||
| bundle.rs | ||
| collide_aabb.rs | ||
| dynamic_texture_atlas_builder.rs | ||
| lib.rs | ||
| rect.rs | ||
| sprite.rs | ||
| texture_atlas_builder.rs | ||
| texture_atlas.rs | ||