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

Fixed a bug that caused incomplete character changes #29

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

takahiro0327
Copy link
Contributor

@takahiro0327 takahiro0327 commented Jun 10, 2024

#27
There seems to be a code somewhere that assumes that the character is changed after more than one frame has elapsed.
The bug was avoided by re-adding the previously existing 'yield return'.
Please review and merge.

Checked in KK and KKS, problem occurred only in KK.
The problem was caused by change #26.
If this causes more problems, it may be better to limit the delay to loading time.

How to reproduce

  1. Load a scene. Chica with large breasts is placed in the scene.
  2. Select a character and change to a chica with smaller breasts.
    Chica breast size will not be changed.

Koikatu_F_20240610082453049_春野 千佳
2024_0610_0826_25_375

Koikatu_F_20240610082333136_春野 千佳

@takahiro0327
Copy link
Contributor Author

takahiro0327 commented Jun 10, 2024

I compared the loading time in KKS before and after the modification.
The loading time of 32 seconds was increased by +0.4 seconds.
It is not enough to actively go to fix it, but it is a subtle difference that I don't feel comfortable leaving alone.

Before: average 31.92[s]

Scene loading completed: 31.8[s]
Scene loading completed: 32.1[s]
Scene loading completed: 32.0[s]
Scene loading completed: 32.1[s]
Scene loading completed: 31.6[s]

After: average 32.32[s] +0.4

Scene loading completed: 32.3[s]
Scene loading completed: 32.1[s]
Scene loading completed: 32.3[s]
Scene loading completed: 32.4[s]
Scene loading completed: 32.5[s]

There was no change in the number of calls to RefreshAllTextures() in KKS.
It is likely that there is processing outside of plugin that is speeded up by changes in character state due to ChangeCustomClothes(), etc.

@ManlyMarco ManlyMarco linked an issue Jun 10, 2024 that may be closed by this pull request
@ManlyMarco ManlyMarco merged commit f85bc8d into ManlyMarco:master Jun 10, 2024
@ManlyMarco
Copy link
Owner

Some plugins that might rely on the delayed loading are MaterialEditor, ABMX, PushUp. Maybe SkinEffects but it should only deal with textures.

The loading time of 32 seconds was increased by +0.4 seconds.

The additional time might be because of the extra frame being rendered? In that case it's difficult to optimize while the return null is present.

@takahiro0327 takahiro0327 deleted the fix_chara_change branch June 10, 2024 22:29
@takahiro0327
Copy link
Contributor Author

I took a profile and looked at it.
Rendering probably has nothing to do with it.
There is the following function that is increasing execution time. But I have no idea why that change would have this result.

  • Studio.OCICharFemale:SetCoordinateInfo (ChaFileDefine/CoordinateType,bool)
    10.9 -> 13.4[s]

  • KKAPI.Chara.CharaCustomFunctionController:OnReloadInternal
    7.5->13.1[s]

  • KoiClothesOverlayX.KoiClothesOverlayController:RefreshAllTextures (bool)
    5.7 -> 7.5[s]

before.csv
after.csv

takahiro0327 added a commit to takahiro0327/Illusion-Overlay-Mods that referenced this pull request Jun 13, 2024
@takahiro0327 takahiro0327 mentioned this pull request Jun 13, 2024
ManlyMarco pushed a commit that referenced this pull request Jun 14, 2024
* Revert "Fixed a bug that caused incomplete character changes (#29)"

This reverts commit f85bc8d.

* Revert "Throttle calls to RefreshAllTexturesCo() (#26)"

This reverts commit a9675e9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breast size regression bug in 6.1.3
2 participants