-
-
Notifications
You must be signed in to change notification settings - Fork 393
[WIP] Enhanced matrix bridge. #723
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
Conversation
Also reminder to update https://zulip.com/integrations/doc/matrix once this PR is merged. |
83e444d
to
be900bb
Compare
be900bb
to
0c91e8e
Compare
There are some Mypy errors in the CI. |
Yeah, I'm about to fix them. Weirdly, I cannot reproduce them with |
190a7da
to
2a06c70
Compare
static analysis is fixed now - I didn't realize that we are stuck to python 3.6 👀 |
67741ba
to
c4e9bac
Compare
6b48c3f
to
c36bf7e
Compare
Hi :) I'm sorry that I forgot to update this. 🙈 This semester, I have been rather busy (after august 15, which is the deadline of my bachelor's thesis, this will improve :) ). However, I would also love to get this finally merged! 🎉 Have some of you tried the new bridge for yourselves? Because the problem I was still struggling with has been the CPU load. When the bridge should be idling (at least in my opinion), it actually has a CPU load of 10% to 13% (observed using |
What did they say about it? If it is |
However, my code changed since then. So maybe I should give it another try? |
Just to be sure that I did not mess up with |
More effective to use this lib instead: https://pypi.org/project/line-profiler/ gives line-by-line profile, and has been used in investigating Zulip code, e.g. the Markdown parsing. |
c36bf7e
to
d07efc7
Compare
d07efc7
to
251a558
Compare
Hm, that sounds cool, thanks! However, I seem to not be able to get it to work:
|
You have to decorate the function you want to profile with kp () {
kernprof -v -l $1 > profile.txt
}
kp your_python_file.py |
I did, but it didn't work. Probably because I need to terminate the script externally or per exception... Or the profiler cannot deal with async code? |
Hm, and somehow, the requirements of the matrix bridge from |
Async should work rkern/line_profiler#103. |
I think it's fine to add |
That requirements.txt is for dev-purpose only. |
251a558
to
12b5e7a
Compare
I got it working. I just needed to make sure that I can trigger the termination without exit (so that the
|
|
I suppose Anyway, I think we should discuss about the performance elsewhere, so that we can focus on getting this PR merged. Everything else other than this comment (the message might be less concise with the extra ID, but I have no strong opinion on this) LGTM. |
Ok :) I think it would be good to have something unique to identify the users from both sides. The matrix id, which is shown on the Zulip side, is of course a bit nicer than the Zulip user id shown on the Matrix side. But the internal Zulip email address wouldn't make much sense either, so I think it's not bad :) |
This looks great, merged, thanks @ro-i and @rht! I think we can wait for feedback from users on the precise formatting; it seems possible it's overly verbose in a way that's annoying, but I'm not really sure. Perhaps you can post some screenshots in #integrations to get more eyes on it. (The CI is an infrastructure failure on a Windows Actions node). The one thing that seems like a natural follow-up to me is that it'd probably be better if the Matrix bridge were a separate |
This reverts commit 72ef52d (zulip#723). The test failure on Windows will need to be debugged before this can be re-merged. Signed-off-by: Anders Kaseorg <[email protected]>
Unfortunately, this was not just an infrastructure failure. I’ve had to revert the last commit in #763 to restore passing CI. @ro-i When you get a chance, please open a new pull request restoring this commit. The failure on Windows will need to be debugged before it can be merged. |
Will do as discussed here! |
Hi :)
As discussed here, I'm now creating the pull request for the new Matrix <-> Zulip bridge.
See here for further discussions about uploading an in-memory file-object to a Zulip server.
Feedback would be greatly appreciated! :)