secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
211 stars 53 forks source link

Do not calculate and store silhouette edges for nearly every geometric prim with a corner #2421

Open cosmic-linden opened 2 months ago

cosmic-linden commented 2 months ago

LLVolumeFace::mEdge is calculated for many prims at region load time (depending on the flags), then stored long-term until the prim is unloaded. This is not necessary because the values of mEdge are only used for calculating silhouette edges, which are part of the selection outlines. Selection outlines can be calculated on-demand, so the silhouette edges should as well.

This should decrease time spent in LLVolumeFace::createSide, and reduce the memory overhead of cubes and some other prims.

Test plan

Selection outlines should look the same as before this change.

igorlproductengine commented 1 month ago

Need more info. Verified on the Second Life Release 7.1.11.10947335521 (64bit) on Win10/OSX in the scope of https://github.com/secondlife/iqa/issues/348.

Could you please provide a test plan?

cosmic-linden commented 1 month ago

@igorlproductengine This ticket already has a test plan. Are you referring to another ticket, or does this ticket's test plan need more detail?

igorlproductengine commented 1 month ago

Passed QA.

Verified on Second Life Release 7.1.11.10947335521 (64bit) on Win10/OSX in the scope of https://github.com/secondlife/iqa/issues/348.