Slowdown when deleting in the UI #1347

Open
opened 2018-09-20 11:09:32 +02:00 by PeterSurda · 4 comments
PeterSurda commented 2018-09-20 11:09:32 +02:00 (Migrated from github.com)

Deleting messages individually causes too much CPU usage. I narrowed it down to propagateUnreadCount in src/bitmessageqt/__init__.py. I remember doing performance tests, so it must have broken since then.

Deleting messages individually causes too much CPU usage. I narrowed it down to `propagateUnreadCount` in `src/bitmessageqt/__init__.py`. I remember doing performance tests, so it must have broken since then.
g1itch commented 2018-09-20 11:12:31 +02:00 (Migrated from github.com)

It seams you mean bitmessageqt not bitmessagemain. I noticed that adding many messages also causes heavy CPU load.

It seams you mean `bitmessageqt` not `bitmessagemain`. I noticed that adding many messages also causes heavy CPU load.
PeterSurda commented 2018-09-20 11:13:16 +02:00 (Migrated from github.com)

Yes.

Yes.
dimyme commented 2018-09-20 12:00:28 +02:00 (Migrated from github.com)

you could use --curses mode (with my fixes) and delete there. seems to work better... ;-)

you could use --curses mode (with my fixes) and delete there. seems to work better... ;-)
g1itch commented 2018-09-20 17:09:24 +02:00 (Migrated from github.com)

Not sure if that related... I thought of adding indexes for frequently used fields in messages.dat, e.g.

create index inbox_read on inbox (read);
create index inbox_folder on inbox (folder);
create index inbox_read_toaddress on inbox (read, toaddress);
create index inbox_toaddress_folder on inbox (toaddress, folder);
create index inbox_fromaddress_folder on inbox (fromaddress, folder);

But when I opened class_sqlThread I realized that it requires a heavy cleanup work. So that's still work in progress in my home repo.

BTW, when I delete a message I see maximum 3% CPU load in SQL thread, it seems not too much compared to ~ 65% when I click any inbox folder.

Not sure if that related... I thought of adding indexes for frequently used fields in messages.dat, e.g. ```sql create index inbox_read on inbox (read); create index inbox_folder on inbox (folder); create index inbox_read_toaddress on inbox (read, toaddress); create index inbox_toaddress_folder on inbox (toaddress, folder); create index inbox_fromaddress_folder on inbox (fromaddress, folder); ``` But when I opened `class_sqlThread` I realized that it requires a heavy cleanup work. So that's still work in progress in my home repo. BTW, when I delete a message I see maximum 3% CPU load in SQL thread, it seems not too much compared to ~ 65% when I click any inbox folder.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-12-17#1347
No description provided.