Zigbee2MQTT + Mosquitto = latency

A few weeks ago, I have bought a couple of Philips Hue white & colour light bulbs with a couple of Philips Hue Dimmer Switch. I have been using them with the Philips Hue Hub and the corresponding HA component.
I was very happy with the experience but I wanted to try something else.

I have now bought a CC2531 Zigbee sniffer dongle and followed the installation of Zigbee2MQTT (and also mosquitto, both on their own Docker containers) from their website.
I have connected two light of my 4 philips light bulbs and one of my dimmer switches to Zigbee2MQTT. I have created a small Node Red flow to connect the on / off buttons to one of the light bulbs.

When I press a button on the dimmer switch, it feels like I have a small latency (about 1s or slightly less) between the press and the light changing.
When I press the color picker of the light bulb (from HA), I also feel like there is a small delay / latency.

In some cases, I ended up with several seconds of delay / latency. In some cases, a couple of commands had been queued and executed at once several seconds after the first command.

I am running everything on docker containers, on a Raspberry Pi 3.

Do you think this delay / latency is expected ? I could see that the flow Zigbee2MQTT -> Mosquitto -> Node Red -> Mosquitto -> Zigbee2MQTT might cause some latency but I wouldn’t expect it to be visible for the user.
Should I be able to get the same response time and reliability as with the Philips Hue hub ?
Is anybody else having latency issues when using Zigbee2MQTT or MQTT in general ?

I am seeing the same issues as you with the same setup (Hassio with Mosquitto and Zigbee2MQTT, 3+ seconds delay!)
I remember it being quasi instant when I first set it up though, don’t know what changed…

Why on earth are you putting node-red in there?

I don’t really like writing HA automations in yaml so I thought using Node Red would be the easy solution, especially as it was designed to handle MQTT-like messages. I take the press messages from the dimmer and send MQTT messages to the corresponding light bulbs.

As I mentioned, I also have a delay when using the HA interface directly (without Node Red)

I’m using quite the same setup. HA + mosquito + node-red are all running in their own docker containers on my NAS, and I have a CC2531 dongle connected to a Raspberry Pi 2 on which is running zigbee2mqtt.
I do not experience any delay when switching on or off my bulbs, either from HA or my Zigbee switches. My flow is even more “complicated”: I use zigbee2mqtt -> Mosquitto -> HA -> Node-Red -> HA -> Mosquitto -> zigbee2mqtt (since node-red is connected to HA and does not handle MQTT messages directly).