Reduce FindObjects #7

Merged
takahiro0327 merged 1 commit from reduced-find-objects into master 2024-08-27 19:46:46 +00:00
takahiro0327 commented 2024-08-27 09:42:59 +00:00 (Migrated from github.com)

I reduced the number of calls to FindObjects.

I've checked that FindObjectsOfType<BetterPenetrationController>().Length and BetterPenetrationController.controllers.Count match up in the rewritten section. It should be safe.
Please review and merge.

Changes in loading time for huge scenes:

Before average 33.82

Scene loading completed: 33.7[s]
Scene loading completed: 33.6[s]
Scene loading completed: 33.9[s]
Scene loading completed: 34.2[s]
Scene loading completed: 33.7[s]

After average 33.3 -0.52

Scene loading completed: 33.2[s]
Scene loading completed: 33.3[s]
Scene loading completed: 33.5[s]
Scene loading completed: 33.3[s]
Scene loading completed: 33.2[s]
I reduced the number of calls to FindObjects. I've checked that `FindObjectsOfType<BetterPenetrationController>().Length` and `BetterPenetrationController.controllers.Count` match up in the rewritten section. It should be safe. Please review and merge. Changes in loading time for huge scenes: Before average 33.82 ``` Scene loading completed: 33.7[s] Scene loading completed: 33.6[s] Scene loading completed: 33.9[s] Scene loading completed: 34.2[s] Scene loading completed: 33.7[s] ``` After average 33.3 -0.52 ``` Scene loading completed: 33.2[s] Scene loading completed: 33.3[s] Scene loading completed: 33.5[s] Scene loading completed: 33.3[s] Scene loading completed: 33.2[s] ```
ManlyMarco (Migrated from github.com) approved these changes 2024-08-27 19:46:39 +00:00
Sign in to join this conversation.
No description provided.