Skip to content

Reuse existing triangles in Triangles background#36951

Merged
peppy merged 2 commits intoppy:masterfrom
EVAST9919:better-triangles
Mar 13, 2026
Merged

Reuse existing triangles in Triangles background#36951
peppy merged 2 commits intoppy:masterfrom
EVAST9919:better-triangles

Conversation

@EVAST9919
Copy link
Copy Markdown
Contributor

As per comment.
Unfortunately I'm not able to reproduce such a big impact of triangles using linked pr (or at all really). In my case usage was low in the first place and went from 0.9% to 0.6% with this pr, so outside benchmarking would be great

Improvement list:

  • No more sorted list. Basic list is being used which is sorted once after all the triangles added.
  • Out-of-bounds triangles are reused rather than removed and re-added.
  • On Reset if AimCount stays the same, all triangles are reused instead of being cleared and re-added.

@peppy
Copy link
Copy Markdown
Member

peppy commented Mar 13, 2026

Unfortunately I'm not able to reproduce such a big impact of triangles using linked pr (or at all really).

I think it is unfairly(?) high in the headless testing because 100% of the time is being spent on cpu bound operations. Also I was filtering out sleep. So you have 3 minutes of gameplay compressed to 1.4 seconds of all the most expensive stuff going on at once.

Which is to say, I think this will make a difference, even if it tests small in the grand scheme 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants