Html template delay


#1

Hello all,

I am trying to create my own Html templates, but I think there is some sort of delay in firing html templates. When i start up the server and the client, and fire any image or other thing, it shows up directly. But when i fire a html template it takes about 2 seconds of transparent screen and then shows up.

My question, why is this? Did i have a setting wrong?

Thanks in advance,
Tygo Koopman


#2

Have you tried something other than your template?

The first load of an HTML template might take a bit longer than it should, but all loads after that should be pretty much instantaneous.


#3

Yes i tried html examples from other users, but those where slow in startup aswell. And i also tried a html page with just a collor as background, so I would expect an instantaneous load.


#4

Windows or linux version? IIRC there was also a problem with some anti-virus if you have one.


#5

Windows, and except for windows defender i have no anti virus


#6

What version of Caspar? Have your tried other/older versions of Caspar?


#7

I am using CasparCG Server 2.0.7.e9fc25a, and i have not tried other versions, I’m trying that next.


#8

Just a suggestion: are you using Google-Fonts? This would mean, if you don’t host them locally, CCG will first download the fonts (again and again), render them, and then playout.


#9

It’s not really a question of how the template is built (apart from the fonts/resources question, since that will add additional time to the load) - there is always a delay before them HTML producer (the module that renders HTML templates) boots up: after it boots up, there is the added delay of fetching the page from local storage or a remote server and then actually rendering the page.

To avoid this boot up (just do it once), I’ve found that it’s a good rule to avoid using the HTML templates like you would use Flash templates or images and use the HTML page as a canvas that you do all of your graphics on with actual playout control done through an out-of-band channel within the HTML page itself (like a WebSocket connection). This is also how frameworks like NodeCG operate.