mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 21:15:56 +03:00
[GH-ISSUE #1279] Message content requests are processed synchronously, resulting in a frozen screen when the user clicks on a message row. #617
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#617
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mercihabam on GitHub (Oct 10, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1279
Originally assigned to: @mercihabam on GitHub.
It would be much better not to have to wait until the request has finished for the app to respond to further actions, such as navigating to another folder or viewing a different message instead of the currently requested one.
I'll explore later how this can be made asynchronous. In the meantime, ideas from everyone are welcome.
@marclaporte commented on GitHub (Jan 24, 2025):
@kroky please advise
@kroky commented on GitHub (Jan 24, 2025):
We have a deeper problem here as ajax requests are asynchronous by default. I think the actual problem is session locking on the PHP side where your other navigation requests get queued and not responded until the original one is ready but it is not, since it is probably waiting for slow IO from an IMAP server. The best we can do on frontend/UI part is some kind of a spinner/waiting message. Dealing with this on the server-side involves some more complex considerations as when we can close the session early (no further writes), can we have async sessions and things like that. We have discusses similar issues with Tiki codebase, so probably worth doing it on a single place. @marclaporte do you know such a place? I am pretty sure session locking as its own issue or set of issues here and in Tiki.
@marclaporte commented on GitHub (Feb 1, 2025):
@kroky Do you mean where we should discuss or which parts of the code?
@kroky commented on GitHub (Feb 3, 2025):
I think we had a session locking discussion for Tiki somewhere with you but I cannot find the thread - was wondering if you remember it?
@marclaporte commented on GitHub (Feb 3, 2025):
https://dev.tiki.org/item8365-Race-condition-Sessions-stored-in-the-database-and-Cypht
Internal tasks:
@kroky commented on GitHub (Feb 4, 2025):
Thanks! I've checked the discussions we had and they involve both Tiki and Tiki-Cypht integration. Part of the updates/fixes for locking and truly asynchronous requests were in Tiki-Cypht integration but now we need to think about standalone Cypht. Recent changes in master made the db-stored sessions work in exclusive lock mode like the file storage sessions in PHP. This is a step forward towards unification. Since Cypht is a heavy user of ajax requests, I think next steps would involve:
@marclaporte commented on GitHub (Feb 5, 2025):
@jasonmunro wrote in the community chatroom:
"Yep, that is a tricky one :) Kroky is correct I believe, the "problem" is session locking. The best I could come up with to help mitigate that was to allow requests to close the session early so any non-writing action can be performed after the session is closed:
github.com/cypht-org/cypht@13e3a960a4/modules/core/handler_modules.php (L120)"Source: https://matrix.to/#/!SeNiIGzqZwRjAclUCr:gitter.im/$7B90VpPjtYJJPygxtN51hDIEeaeSmqmkENfje65FiSo?via=matrix.org&via=gitter.im&via=osba.nl