-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce complexity overhead (and avoid one copy) when obtaining charac…
…ter SSDQs in `SpriteTextDrawNode` Of note, this doesn't show a huge improvement in benchmarks, but in an edge case noticed in osu!, the `AddRange` operation can add a perceivable overhead. We believe this may be a dotnet runtime quirk. Even though this change can't be shown in isolated benchmarks, I'd argue the code quality improvement is worth it. Of note, the caching of the SSDQs at `SpriteText` was a bit redundant as it was being invalidated by basically everything. So it makes sense to just fetch it every time, regardless, in the draw node itself. The only potential saving we could obtain with the previous logic would be to shift the load to the `Update` frame. But this wasn't being done. Rather than investigating whether that has any benefits, I'd rather focus on getting `SpriteText` rewritten to use an optimised shader.
- Loading branch information
Showing
2 changed files
with
47 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters