KTL Causing Super Slow Form Load

Hello!

Our student registration form is pretty complex and relies heavily on the KTL for making the form work. Currently, I have the KTL hiding a bunch of choices from our multiple choice High School course selection field. The form takes FOREVER to load but works perfect once it does load. Here is the link to the form: Knack

Put in a ticket with Knack and they said yes, it is the KTL causing the issue. This was the response:

Thanks for contacting Knack,

After some investigation it does seem related to KTL.


From our engineers: “Looking at the network calls, the entire form loads quickly in the background, but not until the error shows above from KTL the form actually loads”

“Something in KTL is causing the entire page to hold on showing the page until it times out, when the script finishes and page then is shown”. To resolve this, you’ll want to review or adjust the KTL logic so it doesn’t block the page load.

Does anyone know how I can tweak the KTL so the form loads more quickly? Thank you very much!

Dan

cc: @NormandDefayette_CortexRD ? :eyes:

2 Likes

Hi @Dan3,

I will take a look at this right now. BTW, there’s a quick way to disable the KTL on your device only, to determine if it’s causing the issue you’re seeing. See the procedure here: Troubleshooting the KTL · cortexrd/Knack-Toolkit-Library · Discussion #186 · GitHub
It’s always important to try this before opening a ticket with Knack. In this case, you’d do it on GitHub’s issue page.

@Kara - Thanks for flagging me on this.

Norm

1 Like

I found the bug and I have a fix for you to test.
Try Dev code please. Only you will see this fix. When you confirm all is ok, I will release to production in a few minutes.

See here on how to do this: Troubleshooting the KTL · cortexrd/Knack-Toolkit-Library · Discussion #186 · GitHub

Norm

1 Like

Also, I’ve noticed that you’re not using the latest version of KTL_Loader.js. Go fetch it here: Knack-Toolkit-Library/KTL_Loader.js at dev · cortexrd/Knack-Toolkit-Library · GitHub

The only difference, is the cache buster parameter that forces reloading the latest KTL code when there’s an update.

?${new Date().valueOf()}

You can put back the min to full as I saw you were using - thanks :slight_smile: That helped me debug.

1 Like

Hi Normand!

Thank you so very much for your help. Disabled KTL locally and that made the form load fast. I then updated the Loader, changed to full, and put the form into DEV mode and it worked! Please push the fix! :slight_smile:

Dan

It’s out now: KTL v0.34.3
Enjoy,
Norm

Myself, my school, my district and THOUSANDS of students and parents throughout the state of Florida thank you Norm! You are highly appreciated! :slight_smile:

2 Likes

Wow, that’s what I call “appreciation” - and it feels so good. It’s the reason I wake up in the morning with a smile when I go to work. I feel very lucky. Thanks for taking the moment to send me this message.

Cheers,
Norm

1 Like

Thank you for doing what you do man!