Pedro Vicente on Nostr: That “delay in the UI” remark caught my attention. If the delay was because you ...
That “delay in the UI” remark caught my attention. If the delay was because you Were doing a DB query that could be because you were doing a synchronous call. in UI we have to do asynchronous calls or use another thread for things that take a long time . Maybe an issue in Nostr is that it takes a long time to query many different relays . A solution maybe to have a local cache and show that first and then update 🫡
Published at
2023-07-26 08:58:39Event JSON
{
"id": "52801b259c38510fdb263c74538b663256078ca911a425356ad2bfacbb528b33",
"pubkey": "4ea843d54a8fdab39aa45f61f19f3ff79cc19385370f6a272dda81fade0a052b",
"created_at": 1690361919,
"kind": 1,
"tags": [
[
"e",
"e5c3f6708bf8e2ee4351c81c48013059d5587ff73f3a08a3ec4555f158c8786a"
],
[
"p",
"bd1e19980e2c91e6dc657e92c25762ca882eb9272d2579e221f037f93788de91"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
]
],
"content": "That “delay in the UI” remark caught my attention. If the delay was because you Were doing a DB query that could be because you were doing a synchronous call. in UI we have to do asynchronous calls or use another thread for things that take a long time . Maybe an issue in Nostr is that it takes a long time to query many different relays . A solution maybe to have a local cache and show that first and then update 🫡",
"sig": "555507a47fc93d92fd92f1ba7ac441f6f432c26335c6c3087a8dcd11ecbafb60d137f0adc22cbf670e9d4493cd5bf95935ecb3fa4bc3f2612c17bb5817b7ecda"
}