-
-
Notifications
You must be signed in to change notification settings - Fork 248
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
Slow loading of chat messages #2228
Comments
With the work-around that I have applied in my installation, the time spent in the pullChatMessages API call in my environment has decreased significantly - from around 1.7 s to 0.6 s.
It is still TBD if the issue that I had (Large number of DB queries during execution of a single API call) is a common problem or just something incorrect in my installation. Seems to be a problem with database upgrade (migration), but this needs to be confirmed. I plan to keep digging. 😉 |
I have noticed that files (usually images) shared in the chat contribute significantly to the time required to process the API call. See more details in: Reduce number of queries required to read shares. This gives a small improvement on its own, and opens potential for future optimizations (likely in the Files application). |
With nextcloud/server#33540, nextcloud/spreed#7743, nextcloud/spreed#7762 already merged and nextcloud/server#33578 to be merged soon, I think we are getting to the point of diminishing returns. Preliminary measurements on my "production" server show a reduction in execution time of the pullChatMessages API call from about 1700 ms to 450 ms (4x faster). And this is even without backporting nextcloud/server#33578. This is just enough that opening the conversation is no longer annoying. 😉 Still does not feel immediate, but is much better than previously. I plan to keep this issue open for some time - until I am able to confirm the results on the released 25 version. |
I would actually tend to do the opposite. We can close this one as all current ideas have been implemented and 3/4 have been merged. If there is still an issue in 25 we should create a new issue with new profiling of the results and problems in the https://github.com/nextcloud/spreed/ repo. Also it is kind of needed to close issues once they are fixed in master to be able to maintain an overview across the projects and issue trackers. |
@nickvergessen - fair enough. 😉 Closing. |
I have noticed that sometimes it takes a long time (over two seconds) to open the conversation - i.e. from tapping on the conversation to seeing the chat messages. This happens even in perfect network conditions and is long enough to become annoying.
From the log it seems that most of the time is spent server side in the pullChatMessages API call.
I have already started to dig deeper (i.e. in the server side code) and plan to document my findings here (in this issue).
The text was updated successfully, but these errors were encountered: