slack-irssi icon indicating copy to clipboard operation
slack-irssi copied to clipboard

Calls to slack API should be async

Open tedski opened this issue 10 years ago • 7 comments

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.

tedski avatar Oct 01 '14 14:10 tedski

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. :)

mortenlj avatar Apr 19 '15 21:04 mortenlj

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

ailin-nemui avatar Apr 20 '15 09:04 ailin-nemui

I'll vote for Mojo::UserAgent. It's my go to these days with JSON decoding and async support.

ghost avatar Apr 20 '15 11:04 ghost

I'm all for Mojo::UserAgent, I just haven't found the time to do the rewrite. PRs for this are more than welcome.

tedski avatar Apr 20 '15 14:04 tedski

Sounds like a good solution. I'll help out with what I can!

kchr avatar Sep 10 '15 12:09 kchr

I provided a sample port in #19

ailin-nemui avatar Apr 26 '16 12:04 ailin-nemui

Downloading the list may still take too long in which case the code needs to be further reconstructed

ailin-nemui avatar Apr 26 '16 12:04 ailin-nemui