This message was deleted.
# ask-questions
w
This message was deleted.
f
that is a very long time
that doesn't sound right
How are you loading GrowthBook via GTM?
l
Yes via GTM, the "sdk added" is when the tag is loaded
<script> window.gb_start = Date.now(); (function(s) { s=document.createElement('script'); s.async=true; s.dataset.clientKey="xxxxx"; s.dataset.apiHost="http://localhost:3300"; s.src="https://cdn.jsdelivr.net/npm/@growthbook/growthbook/dist/bundles/auto.min.js"; document.head.appendChild(s); })(); console.log("sdk added", Date.now() - window.gb_start); </script>
f
do you have an option of not using GTM?
l
I'll give it a try on a simple empty html page first without the rest of our website loading.
We are using react and our application is pretty heavy, this might be causing delays.
i'll try a blank page first
f
ok
l
On a blank page I get better timings. Is this more realistic? sdk added 0 code loaded 22 queue pushed 1589 check feature on 2011
f
the SDK fetch should be about 20ms
everything else is local, so that seems okay
not sure why the queue push is so long -is there something in the dom?
like is it huge?
its less so the timings - growthbook doesn't really add much to your load- but more making sure that your experiments/features are going to load at the right time
you don't want to have a flicker
do you have a CDN by any chance? if you do, you can use edge workers to run the SDK and save time
l
When I directly add my code in the html page, I get quick responses. https://tools.tadaaz.com/test/growthbook.html
When I do it via tagmanger I get a delay between sdk load an queue push execution. I'm going to see if we can implement the growthbook directly in our webapplication. We plan to do serverside testing in the future with our react app, but need to look into the impact of that on our caching. We are using AWS as environment
Thx for your quick response! awesome!
It seems that gtm debug mode is at least adding 1500ms delay. When container is published it gets way faster. code loaded 32ms sdk added 34ms queue pushed 54ms check feature on 55ms