Skip to content

performance degradation #2353

@r10s

Description

@r10s

as reported recently in testing chat and what i could also reproduce on my not-so-fast-android phone (motog), there seemed to be a speed degration.

i first noticed that in the global search in my 3gb-database, that does all three expensive searches in a row; a simple search for the work "hello" on motog:

using core51 (using rusqlite) on android:

⏰ getContacts: 16ms
⏰ getChatlist: 466ms
⏰ searchMsgs: 959ms

and on core52 (using sqlx) on android:

⏰ getContacts: 34ms
⏰ getChatlist: 521ms
⏰ searchMsgs: 3007ms

on a desktop computer with far more memory, processor etc. this degration is not that huge, but still measureable: a simple search for the word "hello" using the same 3gb-database on repl (only doing searchMsgs):

using core51 (using rusqlite) on desktop:

⏰ searchMsgs: 170ms

using core52 (using sqlx) on desktop:

⏰ searchMsgs: 219ms

i run the test several times, this difference is very reproducible. as this difference is on a very fast machine, it is easily imaginable that that escalates when having far less resources as on low-end phones.

i also checked if the degration is really related to the sqlx-commit, any yes:
commit directly before getting sqlx in: 4dedc2d: 170ms
next commit with sqlx: 6bb5721 219ms

maybe a cache issue? as the degradation is not only on searchMsgs, i doubt there are some sql-commands not transferred correctly, but, of course, that is also worth checking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions