Description
- Operating System (Linux/Mac/Windows/iOS/Android): All
- Core Version: 1.160.0
- Client Version: 1.59.2
Expected behavior
get_full_chat_by_id
is fast-ish
Actual behavior
get_full_chat_by_id
takes ~1 second to complete for a chat with 1000 members.
With DC desktop 1.59.2 the effect is that opening such a chat and loading its messages takes 1 second. May be even more on slower machines, or HDDs.
Steps to reproduce the problem
- Call
get_full_chat_by_id
Although I haven't measured this exactly, but I imagine this part is pretty slow:
core/deltachat-jsonrpc/src/api/types/chat.rs
Lines 68 to 80 in 8dcd8aa
IMO providing contact_ids
is enough, and loading the individual contacts can usually be performed separately.
I would have made an MR, but I wanted to discuss the fact that it's a breaking change. The most conservative course of action would be to introduce a new RPC method called e.g. get_full_chat_by_id_2
and a new type, e.g. FullChat2
, and mark the old ones as deprecated, but I wanted to check in about whether this is too ugly of a name.
And even if we do introduce it, when would be the time to remove the deprecated functions and rename the new ones? Are we ever gonna have the courage to start using semver and release a major version?
But this is probably not that significant of an issue and e.g. solving deltachat/deltachat-desktop#5235 could mitigate the effects of it.