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

matrix.lua makes weechat slow #50

Open
vext01 opened this issue Nov 23, 2016 · 11 comments
Open

matrix.lua makes weechat slow #50

vext01 opened this issue Nov 23, 2016 · 11 comments

Comments

@vext01
Copy link

vext01 commented Nov 23, 2016

Hi,

I've bee frustrated with the performance of weechat recently, and I've pinpointed it to matrix.lua. This script makes the UI laggy.

Are there any low-hanging optimisations or workarounds I can try?

Thanks

@torhve
Copy link
Owner

torhve commented Nov 23, 2016

The matrix protocol makes an extreme number of HTTP requests, especially for large rooms. WeeChat was not designed to handle this as smooth as it could have been.

I have introducted a new setting

/set plugins.var.lua.matrix.presence_filter on

This setting will prevent synapse from sending presence events, and ephemeral events, like typing notification and read notices. This will limit the number of HTTP requests a lot. Please try and see if it helps.

The plan for the future is use a (web)socket transport instead of regular HTTP, which WeeChat supports better. But there is no official such transport yet, only proof of concept proxy.

@vext01
Copy link
Author

vext01 commented Nov 23, 2016

Sadly the UI is still sluggish with this option set. Closing the 'Matrix HQ' buffer helps a lot, but I would like to be in that room ;)

@torhve
Copy link
Owner

torhve commented Nov 23, 2016

Are you using nicklist? If so, try without it.

@vext01
Copy link
Author

vext01 commented Nov 24, 2016

I'm not using nicklist.

@kyrias
Copy link

kyrias commented Nov 25, 2016

When protocols require a lot of requests like Matrix it should really be done from a separate thread, though I'm not sure if Lua/WeeChat makes that easy to do.

(Though now I feel like trying to implement a plugin version of this script, hah.)

@torhve
Copy link
Owner

torhve commented Nov 26, 2016

the script doesn't do any http calls on it's own, I request URLs using weechat's async API for it, so it's that API that is freezing the UI.

@kyrias
Copy link

kyrias commented Nov 26, 2016

Ah, that's... disturbing. Might be worth bringing up on the weechat bugtracker.

@strk
Copy link

strk commented Apr 2, 2017

Are you caching DNS lookups?

@roel0
Copy link

roel0 commented Apr 24, 2017

This script causes 100%Cpu usage on one core, which makes it unusable.

@NickHu
Copy link

NickHu commented Apr 28, 2017

Can confirm that disabling nicklist seems to make it usable/better.

@strk
Copy link

strk commented Apr 29, 2017

This is duplicate of #30

@ara4n ara4n mentioned this issue Dec 18, 2017
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

No branches or pull requests

6 participants