peerreynders

peerreynders

  1. From your description you seem to be pushing the “late” value via a Phoenix channel.
  2. Meanwhile you are potentially delaying the response inside the controller for up to 2.5 seconds for the result to possibly show up.

2.5 seconds is valuable time wasted in terms of UX - i.e. minimizing time to first meaningful paint.

Given that (1.) is already in place, wouldn’t it make more sense to immediately render the page with the “pending” placeholder from the controller and update it in the browser it as soon as the value is pushed via the Phoenix channel?

0
Post #21
lud

lud OP

Well as you want details, there is no phoenix channel, the other way is to post the response to another website via HTTP.

I am implementing a Slack command that will do some stuff on the Gitlab API. Heavy stuff, so it can take a while, but sometimes it will take half a second to work. This is for other devs and they do not really care about the first meaningful paint :smiley:

Indeed, as I am coding it, I am leaning towards always acknowledging first and always sending the reply through the other way. It is not what is asked though, but it seems that the Slack timeout is too sensitive about network latency.

The exercise was entertaining though.

2
Post #22
— All posts loaded —