slack-irssi
slack-irssi copied to clipboard
Calls to slack API should be async
Some of the http requests to the slack api take upwards of 2 seconds to respond. These calls are blocking and therefore should be asynchronous.
I've just started looking at using slack-irssi, but the number of users in our network is large enough that downloading the entire list takes 5-6 seconds each time. That means it's a no-go, since the script times out on every API-call.
Any plans/thoughts on what changes should be done in order to make it async? I might be interested in trying to implement it, if I can find the time/the itch becomes annoying enough. :)
I think it is difficult to do with LWP (will need fork), maybe better to move to an async implementation such as Mojo::UserAgent or Net::Async::HTTP
I'll vote for Mojo::UserAgent. It's my go to these days with JSON decoding and async support.
I'm all for Mojo::UserAgent, I just haven't found the time to do the rewrite. PRs for this are more than welcome.
Sounds like a good solution. I'll help out with what I can!
I provided a sample port in #19
Downloading the list may still take too long in which case the code needs to be further reconstructed