# Node-red-contrib-telegrambot slows down deployment?

**URL:** <https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596>\
**Category:** General\
**Created:** [23 July 2020 10:08 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596 "2020-07-23T10:08:04Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [23 July 2020 10:08 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/1 "2020-07-23T10:08:05Z")

</div>

Hi,

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

Thanks,  
Martyn

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [23 July 2020 15:40 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/2 "2020-07-23T15:40:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [23 July 2020 16:59 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/3 "2020-07-23T16:59:19Z")

</div>

Change the deploy option to 'Modified Flows' for faster deployment  
 ![Screen Shot 2020-07-23 at 12.58.22 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/a/9a238a6ca4a761afd9aeb57456991a8f5a8c7894.png)

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [24 July 2020 11:44 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/4 "2020-07-24T11:44:15Z")

</div>

I could also buy a Raspi 4 for faster deployment 🤨  
@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.

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [24 July 2020 12:25 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/5 "2020-07-24T12:25:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 July 2020 15:27 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/6 "2020-07-25T15:27:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [25 July 2020 17:38 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/7 "2020-07-25T17:38:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [25 July 2020 18:09 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/8 "2020-07-25T18:09:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 July 2020 19:56 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/9 "2020-07-25T19:56:39Z")

</div>

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?

> [@juntiedt](#):
>
> Would you recommend to use webhook?

> [@martynwheeler](#):
>
> the Webhook looks more complex to set up

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.

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [25 July 2020 21:36 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/10 "2020-07-25T21:36:09Z")

</div>

In the UK, standard virgin media network connection.

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [25 July 2020 21:42 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/11 "2020-07-25T21:42:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 July 2020 22:29 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/12 "2020-07-25T22:29:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [25 July 2020 22:37 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/13 "2020-07-25T22:37:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [25 July 2020 22:38 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/14 "2020-07-25T22:38:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 July 2020 22:39 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/15 "2020-07-25T22:39:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 July 2020 07:49 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/16 "2020-07-26T07:49:41Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![juntiedt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/juntiedt/32/58357_2.png) [@juntiedt](https://discourse.nodered.org/u/juntiedt)\
**Post date:** [26 July 2020 09:56 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/17 "2020-07-26T09:56:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![martynwheeler](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/martynwheeler/32/24731_2.png) [@martynwheeler](https://discourse.nodered.org/u/martynwheeler)\
**Post date:** [26 July 2020 15:39 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/18 "2020-07-26T15:39:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [9 August 2020 15:39 UTC](https://discourse.nodered.org/t/node-red-contrib-telegrambot-slows-down-deployment/30596/19 "2020-08-09T15:39:57Z")

</div>

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