-
Notifications
You must be signed in to change notification settings - Fork 165
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
perf(backend): concurrently load messages for combined lists using child processes #1452
Conversation
Hi @mercihabam , Sorry to bother, the idea here is nice but I see a number of problems with this merged PR:
I propose we follow up with these changes:
|
@kroky you're right this is an important change that should be discussed. However, I want to bring to your attention these few points:
|
Yes, I agree, we can continue this way and see how it goes. I assume we will hit some system issues but we can fix. What about the preference suggestion? I do think that is a good idea to keep certain environments happy - e.g. windows host, various docker setups? |
I don't think a new preference is necessary. This implementation has no issues with any OS, nor do we need the previous method of handling sources sequentially. |
The code from this PR does not seem to work when run standalone (i.e. not part of tiki) in a docker environment. I tried pulling it and building an image and running it. It runs, and single inboxes display messages as usual, but the combined pages are empty. The workers/messages_list.php exits with error code 255 in all cases. |
@indridieinarsson, this should work in any environment! I assume it's something very basic causing it to malfunction in your container. Could you debug it further? |
@mercihabam :
|
Seems like, it complains because it doesn't recognize the absolute path given. Could you try to prepend the required file with |
@mercihabam : I need to prepend /usr/local/share/cypht to all the |
Yes like that. |
@mercihabam The worker process is still finishing with errors in some cases. Getting this now: |
Those missing constants have to be defined in the worker file the same way we have declared the |
Are there any cases where it succeeds? |
well, if you don't use redis cache, then it works, at least sometimtes. I also had some cases without redis, where one mailbox failed, then nothing was displayed. |
@indridieinarsson, you are the one capable of diagnosing and fixing what's wrong since you are the one reporting problems. |
I can look into some things. But there are still quite a few issues with this, and the proposed fixes are quite hacky. Like declaring |
@@ -57,7 +57,10 @@ | |||
"twbs/bootstrap": "^5.3", | |||
"twbs/bootstrap-icons": "^1.11", | |||
"webklex/composer-info": "^0.0.1", | |||
"zbateson/mail-mime-parser": "^2.4" | |||
"zbateson/mail-mime-parser": "^2.4", | |||
"react/promise": "^3.2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep this list alphabetically sorted
@indridieinarsson, the instructions I provided were not definitive fixes but rather a way to explore possible solutions for your environment. I understand that you might not be able to make it work definitively, which is fine, but please avoid making such suggestions. In cases where you’re unable to move forward, it’s better to request help instead. |
@mercihabam @indridieinarsson Can you please find each other https://gitter.im/cypht-org/community and organize a screenshare? Thanks! |
|
@mercihabam please add a preference or I will have to revert this PR. I expect issues on some platforms as process execution is not something PHP is supporting well enough and also it is a too disturbing change to not be met with a preference. You cannot just keep saying it will work on all platforms and we take your word for granted. We need a preference for this. |
@kroky, I am against introducing a preference for this because React child processes do not have platform-based limitations. It would be unrealistic for me to impose such restrictions. I don’t see an issue with encountering some errors on certain platforms, but disabling it for some would only hinder us from making it adaptable for all. I appreciate receiving issue reports from users, as this should ideally work in any environment. |
@indridieinarsson messaged me that he won’t be available for a screen share anytime soon, but thanks to him, we already have enough information about the blocker. I’ll take over and implement a proper fix. Thanks again, @indridieinarsson! |
@mercihabam you are going to hinder some people from using a core module of cypht just because of stubbornness? If you are not willing to cooperate, why are you participating in a community project then? As I said, unless you introduce a preference for this new functionality at least until we make it stable and confirm it works fine on many systems, I am going to revert this in master. |
@kroky I’m not trying to challenge your opinion, but rather take a more rational approach. There are no known system limitations to React child processes, so disabling this implementation due to errors would only hinder its adaptability in environments where it could function efficiently. I understand that some pages in master are mostly unusable at the moment, but this should be resolved soon. However, if you’re currently blocked from using master, please revert the relevant commit. |
We are trying to stabilize Cypht master and release stable 2.x version. I am waiting for that to happen for some time now as I need to use cypht behind corporate networks that are highly restrictive and their setups are relatively uncommon (freebsd jails for example). Subprocesses are not even allowed in some of them. Thus, it is not a matter of adapting this but making it optional. It is a performance enhancement but needs a preference, so we keep cypht capable of running in different environments and ultimately making it robust. It seems you don't trust me that we are going to have problems deploying and using your approach in some environments but I speak out of experience here. Please add a preference and make this optional. It could default to true, so user needs to specifically turn it off if something's restricted in their env. |
Great, I will add a preference. |
The reported errors should be fixed by this pull request. |
No description provided.