Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fttb slow response time #3778

Closed
UserZHTW opened this issue Mar 28, 2023 · 6 comments · Fixed by #3788
Closed

fttb slow response time #3778

UserZHTW opened this issue Mar 28, 2023 · 6 comments · Fixed by #3788
Assignees

Comments

@UserZHTW
Copy link

UserZHTW commented Mar 28, 2023

Current Behavior

我發現了一個BUG,當我的通知數來到5000+,fttb時間會來到2秒以上,但如果我清除了所有通知,則會恢復到400MS

我的母語是中文,擔心使用翻譯軟體會有差異,所以在這裡附上中文說明
My native language is Chinese, I am worried that there will be differences when using translation software, so I attach a Chinese explanation here

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 400ms.

Steps to Reproduce

Number of account notifications 5000+

Expected Behavior

Slow initial server response time

Screenshots

No response

Environment

  • Flarum version: 1.7.2
  • Webserver: nginx
  • Hosting environment: dedicated server
  • PHP version: 8.1.7
  • Browser: Chrome

Output of php flarum info

Output of "php flarum info", run this in terminal in your Flarum directory.

Possible Solution

No response

Additional Context

No response

@luceos
Copy link
Member

luceos commented Mar 28, 2023

Please provide output of php flarum info as requested, but do it on discuss first:

https://discuss.flarum.org/d/32646-fttb-slow-response-time

@davwheat
Copy link
Member

If I had to guess, it'd probably be due to the notification count attribute rather than loading of the notifications themselves

@UserZHTW
Copy link
Author

UserZHTW commented Mar 30, 2023

If I had to guess, it'd probably be due to the notification count attribute rather than loading of the notifications themselves

I read all the notifications, but the response is still very slow. Only by delete all notifications, the server response will be faster

@SychO9
Copy link
Member

SychO9 commented Mar 31, 2023

I have yet to confirm, but this may be due to using property_exists before calling disussion_id, I just noticed it wouldn't detect magically added properties, so that was a bad change in 1.7

https://github.com/flarum/framework/blob/main/framework/core/src/Api/Controller/ListNotificationsController.php#L116

@SychO9
Copy link
Member

SychO9 commented Apr 15, 2023

Looking at the notifications logic, I don't see how this could happen, notifications are paginated, and loading the count is not a resource-intensive query. This could be a bad extension.

@UserZHTW
Copy link
Author

UserZHTW commented Jan 5, 2024

Looking at the notifications logic, I don't see how this could happen, notifications are paginated, and loading the count is not a resource-intensive query. This could be a bad extension.

I turned off all extensions and the problem still exists
Still need to delete all notifications to speed up web page access

未命名

Flarum core: 1.8.3
PHP version: 8.1.26

+--------------------------------+----------+--------+
| 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   |        |
+--------------------------------+----------+--------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants