Node-red-contrib-telegrambot slows down deployment?


I was wondering if anyone else notices a significant slowing down of deployment when they have a node-red-contrib-telegrambot node in their flow? It adds a few seconds to redeployment when I make a change. If I disable the flow containing the telegrambot nodes it returns to normal (about a second).


My full deploy is also a bit slow on my Raspi 3 (4-7 seconds with 10 tabs and >300 nodes). But as I disabled the two flows, where my Telegram nodes (receiver, event, command and sender) are, the full deploy is even slower at the first deploy. But then, if I change other nodes while all Telegram nodes disabled, you are right, the full deploy is much faster (1-2 seconds).

Change the deploy option to 'Modified Flows' for faster deployment
Screen Shot 2020-07-23 at 12.58.22 PM

I could also buy a Raspi 4 for faster deployment :face_with_raised_eyebrow:
@zenofmud I know that I can change this option, but @martynwheeler and I discovered, that it is slower with the Telegram nodes activated, so it could be worth looking for the reason, that it takes remarkable longer to deploy.
Sorry, I don't think, that this is the solution of that problem, only a workaround.

I can confirm what stefan24 mentioned. Also my deployment is significantly slower with telegram nodes

Is it slower with the node installed but no instances deployed or just when you have at least 1 instance deployed?

Also, which type of connection are you using for the telegram node? The webhook or the polling connection?

I have one instance send and one receive.
Connection Type polling.
It works perfectly. Only deployment is a bit slower.
Would you recommend to use webhook?

It is slower when deployed. If I disable the flow with the telegram nodes it is back to normal.

I am using polling, the Webhook looks more complex to set up. Martyn

OK, that gives something to go on. Probably need to break out a debugger now. Not sure if I'll have time but if I do, I'll have a look.

I would suggest raising an issue on GitHub. Perhaps the author can work some magic and speed things up or at least indicate why it is slow.

On my own instances of Node-RED however, it doesn't seem particularly slow & I'm using polling as well. I wonder if you have anything odd going on at the network level.

Hmm, what country are you in? Do you have a different Internet connection you could try (maybe tethered mobile?) My paranoid mind is making me wonder if something is interfering with your connection to Telegram.

On a less paranoid track - what is the state of your Internet connection?

It is indeed more complex and you have to have an inbound connection through your firewall so taking care of security would be important.

However, it is certainly a lot more efficient and messages will generally get from Telegram to Node-RED bit faster too and it will be less of a load on your network.

In the UK, standard virgin media network connection.

I am using pi-hole as my DNS server on my network. Don't know if that makes a difference?

Hmm, possibly. Is that running on the same Pi as NR? Are you also running a desktop on that Pi?

Do you monitor the Pi for performance?

No it is on a different pi connected directly to my router. All my RPis are headless with Buster lite so no desktop. NR is on a pi3 and that is its sole function.

No performance monitoring, I can do though what parameters should I look for?

OK, good. But I think that I would add some monitoring to the PiHole to make sure that it wasn't misbehaving.

It is easy enough to temporarily disable pihole,
sudo pihole disable

On the basic question here, does it mean that the telegram node does some significant synchronous processing on deploy rather than just starting it to run async? For example, even if the network were not available at all one would not expect this to cause a holdup on Deploy, would one?

probably drilling a hole through the fire-walls takes some time :wink: - just kidding.
For me Telegram works perfectly and I can live with the little delay on deployment.

Yes, easy to disable but have to reroute traffic as everything is passing through it atm. Will give it a try later.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.