framework icon indicating copy to clipboard operation
framework copied to clipboard

fttb slow response time

Open UserZHTW opened this issue 2 years ago • 1 comments

Current Behavior

I found a bug where the fttb (first time to byte) time would exceed 2 seconds when my notification count reached 10000+. However, if I cleared all notifications, the fttb time would return to 500ms.

Steps to Reproduce

Number of account notifications 5000+

Expected Behavior

Slow initial server response time

Screenshots

294571602-8f9e10d0-070b-48f7-9d42-ff01e45560d7

Environment

Flarum version: 1.8.3 Webserver: nginx Hosting environment: dedicated server (64GB RAM , 6c/12t) PHP version: 8.1.2 Browser: Chrome

Output of php flarum info

+--------------------------------+----------+--------+
| Flarum Extensions              |          |        |
+--------------------------------+----------+--------+
| ID                             | Version  | Commit |
+--------------------------------+----------+--------+
| flarum-flags                   | v1.8.0   |        |
| flarum-approval                | v1.8.1   |        |
| flarum-tags                    | v1.8.0   |        |
| kater-lang-traditional-chinese | dev-main |        |
| flarum-suspend                 | v1.8.1   |        |
| flarum-subscriptions           | v1.8.0   |        |
| flarum-sticky                  | v1.8.0   |        |
| flarum-statistics              | v1.8.0   |        |
| flarum-nicknames               | v1.8.0   |        |
| flarum-mentions                | v1.8.2   |        |
| flarum-markdown                | v1.8.0   |        |
| flarum-lock                    | v1.8.0   |        |
| flarum-lang-english            | v1.8.0   |        |
| flarum-emoji                   | v1.8.0   |        |
| flarum-bbcode                  | v1.8.0   |        |
+--------------------------------+----------+--------+


Possible Solution

Clear redundant notifications if there are more than 1000 notifications or limit the number of notifications displayed to 999+?

Additional Context

This problem still exists

https://github.com/flarum/framework/issues/3778

UserZHTW avatar Jan 08 '24 13:01 UserZHTW

Having similar issues. My installation involved a migration from an old server to a new one, which included a Flarum update (Flarum 1.1.1 -> 1.8.5).

Had to truncate the entire notification db table (600k+ entries, notifications always stay in the table and just get a deleted mark (???)), to make the loading speed acceptable for users. Performance is still worse than expected, and once a while clearing account notifications speeds up the FTTB. Something between 1.1.1 and 1.8.5 has seriously decreased performance within the notifications.

RickvanLoo avatar Sep 09 '24 18:09 RickvanLoo