CW-1024 Improve performance of xmr wallet (#2128)

* - enabled development options in CI builds.
- Implemented caching for account retrieval.
- refactor transaction handling in `dashboard_view_model.dart` to improve efficiency and reduce unnecessary updates in xmr.
- `DevMoneroCallProfilerPage`, for profiling performance of xmr,wow,zano wallet calls.

* use FeatureFlag.hasDevOptions

* prevent crashes in monero_c by using mutexes properly
improve performance of _transactionDisposer
remove unnecessary checks

* remove logging, bring back simplified logic

* update _transactionDisposer on length and confirmation of first and last transaction

* address comments from review

* don't throw unhandled exceptions in unawaited async code

* use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex

* [DNM] fix: crashes when opening wallet, performance issue when syncing and update dependencies

* Revert "use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex"

This reverts commit 4c4c33ac6a47603e970a6c8d940e90204525b241.

* Revert "[DNM] fix: crashes when opening wallet, performance issue when syncing and update dependencies"

This reverts commit d7603445ad6ae76d76bf179c34728ce242c8c610.

* Revert "use cached transaction list in getAllSubaddresses, fix usage of txHistoryMutex"

This reverts commit 4c4c33ac6a47603e970a6c8d940e90204525b241.

* update shared_preferences

* improve state management performance by not rendering multiple changes in transaction screen on a single frame

* fix wallet switching
This commit is contained in:
cyan 2025-04-03 03:31:25 +02:00 committed by GitHub
parent 27eaa1b1cc
commit cbca4c9c77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 498 additions and 105 deletions

View file

@ -8,6 +8,7 @@ import 'package:cake_wallet/src/screens/settings/widgets/settings_cell_with_arro
import 'package:cake_wallet/src/screens/settings/widgets/settings_picker_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_switcher_cell.dart';
import 'package:cake_wallet/src/screens/settings/widgets/settings_version_cell.dart';
import 'package:cake_wallet/utils/feature_flag.dart';
import 'package:cake_wallet/view_model/settings/other_settings_view_model.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:flutter/foundation.dart';
@ -64,12 +65,18 @@ class OtherSettingsPage extends BasePage {
handler: (BuildContext context) =>
Navigator.of(context).pushNamed(Routes.readDisclaimer),
),
if (kDebugMode && _otherSettingsViewModel.walletType == WalletType.monero)
if (FeatureFlag.hasDevOptions && _otherSettingsViewModel.walletType == WalletType.monero)
SettingsCellWithArrow(
title: '[dev] monero background sync',
handler: (BuildContext context) =>
Navigator.of(context).pushNamed(Routes.devMoneroBackgroundSync),
),
if (FeatureFlag.hasDevOptions && [WalletType.monero, WalletType.wownero, WalletType.zano].contains(_otherSettingsViewModel.walletType))
SettingsCellWithArrow(
title: '[dev] xmr call profiler',
handler: (BuildContext context) =>
Navigator.of(context).pushNamed(Routes.devMoneroCallProfiler),
),
Spacer(),
SettingsVersionCell(
title: S.of(context).version(_otherSettingsViewModel.currentVersion)),