weechat.el
weechat.el copied to clipboard
weechat-get-more-lines is really slow
When I'm disconnected from my relay for a couple of days and want to catch up, I use weechat-get-more-lines. Loading more than a few lines is really slow though and seems to reinitialise the buffer completely.
Can you help me figure out how it could be made faster? Ideally there would be a function that loads lines asynchronously up to the unread marker line.
I'm sorry that weechat.el is as slow as it is - I hardly have the time to do a sophisticated refactoring that is so urgently needed.
One thing that's quite slow is weechat-print-line
and the function it calls into. Another thing that's contributing to the slowness is the binary-parsing done in weechat-relay.el
. I spent some time trying to figure out what's really slow there (mostly via Emacs' profiling capabilities) but haven't gotten anywhere.
As I said: I think weechat.el
could benefit from a new architecture: Doing less buffer updates, batching more stuff, and generally a more pull-driven approach (compared to the eager-rendering done from weechat-relay-process-sentinel
.