Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: ensure notification settings are cached from RPC #10532

Merged
merged 1 commit into from
May 4, 2023

Conversation

0x-r4bbit
Copy link
Member

There are a bunch of notification related settings that cause RPC calls when read from the UI in QML/Qt.

This is bad because whenever the view tries to read a notification setting it causes an RPC call and then rerenders the view. This happens pretty much every time a new signal arrives in the client.

To account for that we now fetch all notification settings once and mark the service as initialized so it know when to simply return cached values. The cache is updated when the notification settings change.

Fixes #10493

There are a bunch of notification related settings that cause RPC
calls when read from the UI in QML/Qt.

This is bad because whenever the view tries to read a notification
setting it causes an RPC call and then rerenders the view. This happens
pretty much every time a new signal arrives in the client.

To account for that we now fetch all notification settings once and mark
the service as initialized so it know when to simply return cached
values. The cache is updated when the notification settings change.

Fixes #10493
@0x-r4bbit 0x-r4bbit requested review from igor-sirotin and mprakhov May 3, 2023 12:43
@status-im-auto
Copy link
Member

status-im-auto commented May 3, 2023

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2275ce2 #1 2023-05-03 12:49:40 ~5 min tests/imports 📄log
✔️ 2275ce2 #1 2023-05-03 12:49:45 ~5 min tests/nim 📄log
✔️ 2275ce2 #1 2023-05-03 12:53:09 ~8 min macos/aarch64 🍎dmg
✔️ 2275ce2 #1 2023-05-03 12:58:10 ~13 min macos/x86_64 🍎dmg
✔️ 2275ce2 #1 2023-05-03 12:59:47 ~15 min linux/x86_64 📦tgz
✔️ 2275ce2 #1 2023-05-03 13:07:13 ~23 min tests/e2e 📄log
✔️ 2275ce2 #1 2023-05-03 13:18:46 ~34 min windows/x86_64 💿exe

Copy link
Contributor

@igor-sirotin igor-sirotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested 👍 thanks!

@0x-r4bbit 0x-r4bbit merged commit 202a789 into master May 4, 2023
@0x-r4bbit 0x-r4bbit deleted the fix/cache-notif-rpc-calls branch May 4, 2023 07:32
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Many settings request RPCs on each received message
5 participants