auticus / BattleTechTracking

UWP, Android, and iOS project for tracking a BattleTech campaign.
0 stars 0 forks source link

Poor Performance #42

Open auticus opened 2 years ago

auticus commented 2 years ago

Poor Performance: Switching to next round (MatchViewModel::RefreshObservableCollection - clearing and repopulating collection is holding memory) Switching Actions - same issue with above, causes the Refresh method which is holding memory. Loading Components, Equipment, Weapons - creating the new observable each time blows memory up. Switching Factions (resolved)

auticus commented 2 years ago

When loading the save files, the issue is gone. This indicates that over time something is building up massively in the app that is causing the slow down and that restarting resolves it.

auticus commented 2 years ago

Load - 46.8mb

Loading game: 76.4mb Set everything to "Moved" - jumps up to 85.7 mb Set everything to shot - 115mb

Everytime you change a status - it adds to memory Everytime you click on a button at the bottom it adds to memory Changing factions - bumps memory Next round - bumps up memory but only if there are things that have had status changes

Just sitting there going back and forth with the faction buttons at top bloats memory.

Suspected issue is creating new observable collections. Look at caching them instead. This may be because of event handlers not going out of scope keeping the objects in memory (but we don't want the GC to have to fire off all the time either anyway)

auticus commented 2 years ago

Resolved Faction changing causing issues.