HomePhabricator

[Cashtab] Adjust TRIGGER_UTXO_REFRESH_INTERVAL_MS to prevent multiple calls to…

Description

[Cashtab] Adjust TRIGGER_UTXO_REFRESH_INTERVAL_MS to prevent multiple calls to update

Summary:
Have noticed Cashtab load times slowing down. Adding some log statements, could tell the update routine was getting called several times before the interval readjusted.

This is probably due to the React upgrade.

The current system in Cashtab is not the right way to refresh the wallet. We should only call update when we need to, i.e. on app startup and when the wallet receives tx notifications from the websocket. However, some additional refactor work needs to be done for this approach, and the issue is impacting load times in prod rightnow.

Patch while work out the optimization.

Test Plan: npm test, check out dev site at https://cashtab-local-dev.netlify.app/ which has a console.log statement and confirm update called only one time

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D15565

Details

Provenance
bytesofmanAuthored on Feb 27 2024, 23:16
bytesofmanPushed on Feb 28 2024, 11:04
Reviewer
Restricted Project
Differential Revision
D15565: [Cashtab] Adjust TRIGGER_UTXO_REFRESH_INTERVAL_MS to prevent multiple calls to update
Parents
rABC11c9130bcb07: [Chronik] Optimize `GroupUtxoWriter` using merge ops and compaction filters
Branches
Unknown
Tags
Unknown