Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osu!taiko is not benefitting from pooling #21072

Open
peppy opened this issue Nov 2, 2022 · 2 comments · May be fixed by #31297
Open

osu!taiko is not benefitting from pooling #21072

peppy opened this issue Nov 2, 2022 · 2 comments · May be fixed by #31297
Labels
priority:1 Very important. Feels bad without fix. Affects the majority of users. ruleset/osu!taiko type:performance

Comments

@peppy
Copy link
Member

peppy commented Nov 2, 2022

Every usage of DrawableTaikoHitObject recreates its drawable hierarchy in OnApply, rather than pooling per type (all combinations of centre/rim strong/normal).

protected override void OnApply()
{
base.OnApply();
RecreatePieces();
}
protected virtual void RecreatePieces()
{
Size = BaseSize = new Vector2(TaikoHitObject.DEFAULT_SIZE);
if (MainPiece != null)
Content.Remove(MainPiece, true);
Content.Add(MainPiece = CreateMainPiece());
}

@peppy peppy added type:performance ruleset/osu!taiko priority:2 Moderately important. Relied on by some users or impeding the usability of the game labels Nov 2, 2022
@bdach
Copy link
Collaborator

bdach commented Nov 2, 2022

The reason this particular flow was originally done is for editor purposes, to support changing hit colour. Making this work as described (each colour pooled separately) likely requires extra work on pooling in editor as to me there is no known precedent for essentially changing the type of pooled drawable used.

@peppy
Copy link
Member Author

peppy commented Nov 7, 2022

if (drawableObject.HitObject.Kiai)
kiaiExplosionContainer.Add(new KiaiHitExplosion(drawableObject, type));

This is also another WTF.

@peppy peppy added priority:1 Very important. Feels bad without fix. Affects the majority of users. and removed priority:2 Moderately important. Relied on by some users or impeding the usability of the game labels Oct 27, 2023
Nikita-str added a commit to Nikita-str/osu that referenced this issue Dec 26, 2024
DrawableHit & Hit types splitted into two

TODO:
* correct way (currently not working) for TaikoModSwap
* correct way (currently exception ^~^) for editor
* remove `ChangeType` (at least current realization)
* fix Tests XD
* run benchmarks -- is the changes useful at all?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:1 Very important. Feels bad without fix. Affects the majority of users. ruleset/osu!taiko type:performance
Projects
None yet
2 participants