[PERFORMANCE] General Optimizations + Dynamic Storyboard Rendering#264
Open
menvae wants to merge 21 commits into
Open
[PERFORMANCE] General Optimizations + Dynamic Storyboard Rendering#264menvae wants to merge 21 commits into
menvae wants to merge 21 commits into
Conversation
(update to gen-opt branch NOT upstream)
improves game start up time
+ probably better memory management from 'using'
+ line 300 ScoreListTab.cs possible multi quering fixed
- profile score & MapCard opt for profile overlay - MapCard opt for browse overlay
- using CullableContainer is much more reliable & maintainable AND cleaner than our old stream method + removed the stream option & its strings since we don't actually need it anymore
+ we don't save much on drawcalls but there is defenitely a big performance improvement if we have a bunch of tags idiling + make positioning and tag creating more stable
this one is a very small optimization but it's easy and doesn't hurt to have
I forgot what I was going to say here
…I can't stand it reappearing all the time
+ add queuing/debouncing for static sb elements' updating + fix clipping for timeline tag container + improve after load time for mapset header drawables
this should be done only for dragging timeline elements not just on any update
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires:
This Pull Request does not have any optimizations gameplay-wise
This Pull Request aims to optimize as much of static drawables as possible, drawables that do not update often and are heavily nested. By using cached buffered containers we are able to substantially improve our game's performance.
On top of this it also implements the long awaited Dynamic Storyboarding system which no words can describe how much better the storyboard editor feels now.
Cached Buffered Container Principal
In most of these static drawables you have load wrappers for async loaded sprites so we keep updating it until it has fully loaded and add it to a
LoadingStateflags enums when there is more than one thing that is asynchronously loaded.We redraw the drawable based on its LatestTransformTime (for THIS drawable, LatestTransformTime isn't affected by the drawable's children), load state and if it is hovered or has a specific state that it should always be redrawn in like when a mapset needs updating or when downloading a replay.
Huge Optimzations
CullableFlowContainerinstead of the old convoluted streaming method which was unreliableDrawableMapSetHeader,DrawableMapSetDifficultyandScoreListEntryare all static most of time and heavily nested, especiallyDrawableMapSetHeader.PointsListCullableFlowContainerto cull points that are not visible.Medium Optimizations
TimelineTagsProfileScore(static & nested)MapCard(BrowseOverlay&ProfileOverlay) (static & nested)MapCardcould qualify as a huge perf improvement since it cuts down on drawcalls by a ton but I'll keep it in mediumImage.Loadcan already take a raw bytes buffer so no need to convert to array, also we now use..usingthough I haven't checked if it makes a difference but it's good practice for memory management and doesn't hurt to doMinor Optimizations
TimelineDensityChanges
DelayedLoadWrapperinstead ofDelayedLoadUnloadWrapperbecauseDelayedLoadUnloadWrapperneeds to be always updated to work properly which defeats the purpose of caching this drawable in the first place, so to unload it we unload it insideDrawableMapSetItemScoreListTab(line 300) that was inefficient at indexing and replaced with a normal for loopTry It Yourself:
Compare between steam version and this branch
new PointsList perf: https://fluxis.flux.moe/set/1658
new Dynamic Storyboard: https://fluxis.flux.moe/set/1652
new Song Select perf
Unlimitednew File Select perf
C:\Windows\WinSxS. I don't know if there is a directory like this on linux but probably not because windows sucks and it loves eating your storage space.