BattletechPerformanceFix icon indicating copy to clipboard operation
BattletechPerformanceFix copied to clipboard

Replace PrefabCache with .. an actual cache.

Open m22spencer opened this issue 7 years ago • 1 comments

[Info]Summary {SimGame}: 
    :DataManager::PooledInstantiate_Patch2  83     4060.4984
    :Resources::Load_Patch2                 39     2664.6609
    :PrefabCache::PooledInstantiate_Patch2  83     1527.9782
    :TextMeshProUGUI::Awake_Patch2          975    26.9002
    :TMP_Text::Awake_Patch2                 975    6.3305
    :NestedPrefabAnchor::Awake_Patch2       616    1.7022
    :UIBehaviour::Awake_Patch2              4694   10.6964
    :UISpinner::Awake_Patch2                7      0.1024
    :AkGameObj::Awake_Patch2                4      0.0344
    :SimGameCharacter::Awake_Patch2         39     2.6775
    :BTDecal::Awake_Patch2                  40     1.4295
    :MoodController::Awake_Patch2           1      0.0476
    :SimGameSpaceSelector::Awake_Patch2     4      0.13
    :ShipRumble::Awake_Patch2               2      0.0142
    :WeatherController::Awake_Patch2        1      0.2111
    :SimGameUXCreator::Awake_Patch2         1      4956.1669
    :DOTweenAnimation::Awake_Patch2         5628   25.5529
    :HBSTooltip::Awake_Patch2               515    1.2761
    :HBSDOTweenToggle::Awake_Patch2         242    6.5721
    :HBSButton::Awake_Patch2                355    6.1347
    :HBSButtonBase::Awake_Patch2            355    3.8042
    :HBSDOTweenButton::Awake_Patch2         112    3.3599
    :HBSListViewCustom`2::Awake_Patch2      4      11.9538
    :Selectable::Awake_Patch2               31     0.0806
    :HBSSliderInput::Awake_Patch2           2      0.7229
    :SGBarracksRosterList::Awake_Patch2     3      3.2352
    :MechBayMechInfoWidget::Awake_Patch2    2      180.7937
    :MechLabHardpointElement::Awake_Patch2  16     0.0539
    :LanceMechEquipmentList::Awake_Patch2   2      0.0067
    :TMP_InputField::Awake_Patch2           3      0.0238
    :HBSLoopScrollRect`2::Awake_Patch2      3      9.4697
    :MechBayChassisInfoWidget::Awake_Patch2 1      17.2844
    :MechBayItemInfoWidget::Awake_Patch2    1      0.0036
    :HBSTooltipHBSButton::Awake_Patch2      18     0.5001
    :PressEscapeToClick::Awake_Patch2       1      0.0071
    :BTCustomRenderer::Awake_Patch2         2      0.0167
    :BTScreenShot::Awake_Patch2             2      0.0193
    :EnvironmentOverlays::Awake_Patch2      1      15.8512
    :StaticCombineChildren::Awake_Patch2    1      54.6274
    :StarmapRenderer::Awake_Patch2          1      0.3118

[Info]Summary {SimGame}: 
    :DataManager::PooledInstantiate_Patch2  82     1647.0382
    :Resources::Load_Patch2                 38     250.2396
    :PrefabCache::PooledInstantiate_Patch2  82     1396.6239
    :UIBehaviour::Awake_Patch2              4677   10.6126
    :AkGameObj::Awake_Patch2                4      0.0325
    :SimGameCharacter::Awake_Patch2         39     0.912
    :BTDecal::Awake_Patch2                  40     0.3874
    :MoodController::Awake_Patch2           1      0.0029
    :SimGameSpaceSelector::Awake_Patch2     4      0.0308
    :ShipRumble::Awake_Patch2               2      0.008
    :WeatherController::Awake_Patch2        1      0.0064
    :SimGameUXCreator::Awake_Patch2         1      2754.3164
    :TextMeshProUGUI::Awake_Patch2          973    25.7919
    :TMP_Text::Awake_Patch2                 973    6.0004
    :DOTweenAnimation::Awake_Patch2         5628   20.5197
    :NestedPrefabAnchor::Awake_Patch2       612    1.6882
    :HBSTooltip::Awake_Patch2               515    1.2371
    :HBSDOTweenToggle::Awake_Patch2         242    6.4812
    :HBSButton::Awake_Patch2                355    6.28
    :HBSButtonBase::Awake_Patch2            355    3.7163
    :HBSDOTweenButton::Awake_Patch2         112    3.5997
    :HBSListViewCustom`2::Awake_Patch2      4      8.199
    :Selectable::Awake_Patch2               31     0.0778
    :UISpinner::Awake_Patch2                5      0.0149
    :HBSSliderInput::Awake_Patch2           2      0.0202
    :SGBarracksRosterList::Awake_Patch2     3      2.5313
    :MechBayMechInfoWidget::Awake_Patch2    2      49.9373
    :MechLabHardpointElement::Awake_Patch2  16     0.0473
    :LanceMechEquipmentList::Awake_Patch2   2      0.0061
    :TMP_InputField::Awake_Patch2           3      0.0242
    :HBSLoopScrollRect`2::Awake_Patch2      3      7.6524
    :MechBayChassisInfoWidget::Awake_Patch2 1      17.0884
    :MechBayItemInfoWidget::Awake_Patch2    1      0.0033
    :HBSTooltipHBSButton::Awake_Patch2      18     0.1544
    :PressEscapeToClick::Awake_Patch2       1      0.0032
    :BTCustomRenderer::Awake_Patch2         2      0.0072
    :BTScreenShot::Awake_Patch2             2      0.0097
    :EnvironmentOverlays::Awake_Patch2      1      15.7168
    :StaticCombineChildren::Awake_Patch2    1      45.7033
    :StarmapRenderer::Awake_Patch2          1      0.0609


[Info]Summary {mapGeneral_rollingHillsLakeA_vLow}: 
    :DataManager::PooledInstantiate_Patch2         456    10394.4313
    :Resources::Load_Patch2                        83     6287.4326
    :PrefabCache::PooledInstantiate_Patch2         854    2444.2722
    :TextMeshProUGUI::Awake_Patch2                 1698   48.0806
    :TMP_Text::Awake_Patch2                        1698   12.1814
    :NestedPrefabAnchor::Awake_Patch2              6831   15.6677
    :UIBehaviour::Awake_Patch2                     9522   21.7696
    :UISpinner::Awake_Patch2                       9      0.0982
    :AkGameObj::Awake_Patch2                       22     0.5893
    :SimGameCharacter::Awake_Patch2                39     2.3303
    :BTDecal::Awake_Patch2                         102    2.1168
    :MoodController::Awake_Patch2                  2      0.047
    :SimGameSpaceSelector::Awake_Patch2            4      0.1363
    :ShipRumble::Awake_Patch2                      3      0.0207
    :WeatherController::Awake_Patch2               2      0.1455
    :SimGameUXCreator::Awake_Patch2                1      5903.2372
    :DOTweenAnimation::Awake_Patch2                8528   200.945
    :HBSTooltip::Awake_Patch2                      691    1.7013
    :HBSDOTweenToggle::Awake_Patch2                268    7.5171
    :HBSButton::Awake_Patch2                       870    14.9912
    :HBSButtonBase::Awake_Patch2                   870    9.3739
    :HBSDOTweenButton::Awake_Patch2                601    15.51
    :HBSListViewCustom`2::Awake_Patch2             4      12.0008
    :Selectable::Awake_Patch2                      69     0.177
    :HBSSliderInput::Awake_Patch2                  2      0.6036
    :SGBarracksRosterList::Awake_Patch2            3      3.1303
    :MechBayMechInfoWidget::Awake_Patch2           2      100.5849
    :MechLabHardpointElement::Awake_Patch2         16     0.0547
    :LanceMechEquipmentList::Awake_Patch2          2      0.0062
    :TMP_InputField::Awake_Patch2                  3      0.0246
    :HBSLoopScrollRect`2::Awake_Patch2             3      9.1667
    :MechBayChassisInfoWidget::Awake_Patch2        1      16.3993
    :MechBayItemInfoWidget::Awake_Patch2           1      0.0035
    :HBSTooltipHBSButton::Awake_Patch2             20     0.5576
    :PressEscapeToClick::Awake_Patch2              2      0.0107
    :BTCustomRenderer::Awake_Patch2                4      0.0198
    :BTScreenShot::Awake_Patch2                    3      0.0219
    :EnvironmentOverlays::Awake_Patch2             2      32.3763
    :StaticCombineChildren::Awake_Patch2           1      54.2899
    :StarmapRenderer::Awake_Patch2                 1      0.3136
    :AssetBundleManager::GetAssetFromBundle_Patch2 103    2313.9198
    :GameRepresentation::Awake_Patch2              96     0.5491
    :BTDecalSpawner::Awake_Patch2                  7      0.0237
    :UICreep::Awake_Patch2                         22     0.0699
    :BTWindZone::Awake_Patch2                      45     0.1139
    :LoadingCamera::Awake_Patch2                   1      0.78
    :ModuleAutoLauncher::Awake_Patch2              1      0.004
    :HBSWaterPlane::Awake_Patch2                   9      0.0527
    :TerrainTextures::Awake_Patch2                 1      0.8474
    :CombatUXCreator::Awake_Patch2                 1      0.093
    :EmptyCustomChunkGameLogic::Awake_Patch2       6      0.017
    :DialogueChunkGameLogic::Awake_Patch2          4      0.0135
    :MessageCenterWatcher::Awake_Patch2            2      8.0142
    :MessageCenterWatcherList::Awake_Patch2        460    1.0836
    :EncounterLayerParent::Awake_Patch2            1      0.139
    :UIBleep::Awake_Patch2                         30     0.1006
    :LaserEffect::Awake_Patch2                     14     0.1552
    :WeaponEffect::Awake_Patch2                    50     0.1463
    :MissileLauncherEffect::Awake_Patch2           11     0.1357
    :PPCEffect::Awake_Patch2                       3      0.0306
    :MeleeEffect::Awake_Patch2                     18     0.1508
    :MissileEffect::Awake_Patch2                   1      0.0101
    :BallisticEffect::Awake_Patch2                 1      0.0141
    :BurstBallisticEffect::Awake_Patch2            1      0.0164
    :CombatHUDMWStatus::Awake_Patch2               4      0.0839
    :UISweep::Awake_Patch2                         132    0.3121
    :VFXRenderer::Awake_Patch2                     1      0.0674
    :CombatMovementReticle::Awake_Patch2           1      0.9693
    :FogOfWarView::Awake_Patch2                    1      0.1627
    :BulletEffect::Awake_Patch2                    1      0.013
    :UIMovementDot::Awake_Patch2                   61     0.174

m22spencer avatar Dec 11 '18 10:12 m22spencer

Most Awake look good enough to stagger. Start needs profiling, but should be good enough to stagger

A custom cache is going to require the following:

AssetBundleManager{ AutoUnloadAll, ForceUnloadAll
                  , UnloadAll, UnloadByName}                    -> Drop
AssetBundleManager{ GetAssetFromBundle<T>, GetLoadedAssetBundle
                  , IsBundleLoaded, RequestAsset<T>
                  , RequestBundle}                             -> Handle
DataManager{PrecachePrefabAsync, PrecachePrefab}               -> either Drop or Hint
DataManager{PooledInstantiate}                                 -> Redirect to prefab-cache
DataManager{RequestResource_Internal}                          -> Hint if prefab
DataManager{Exists}                                            -> Redirect to prefab-cache if prefab

PrefabCache{*}                                                 -> Handle
QueuedPoolHelper{SpawnNext}                                    -> Drop

m22spencer avatar Dec 11 '18 11:12 m22spencer