Hi guys, I have a form that is quite long. Generally everything works well and fairly quickly apart from this one area. I think the video should demonstrate the issue. And I apologise now for wasting 3 minutes of your time.
Sorry about the babbling in the video, I didn’t prepare a script. And I was distracted part way through, but it still shows the delay.
Why is there such a delay?
Should I be putting the ternary data binding code in the Yes/No button and triggering it from a ‘Value Changed’ or ‘Blur’ type of action? Will this speed things up?
@UKRiggers, out of curiosity, when you look at the developer tools > network what does the load time for the form look like and does it change as you navigate through the form or is it consistent?
On thing I have done on some of my longer forms is make it so that the queries only load upon the click of the next page. That seems to speed things up for me versus having everything load at once.
I am not sure if you have broken up your form that way or not, so I am just guessing, but the load time in the developer tools should give you an indication if it is a server load versus something in the app structure.
And FYI you did not babble. If I ever make a video, you will hear true babbling, LOL.
To me, visually, it loads quickly. I’m not very good at interpreting the Network tab with respect to speeds, I use that tab to check on the integrity of the data from the queries. Here is a screenshot that might tell you something. When I click the Yes/No button mentioned above, nothing more is recorded in this Network tab.
in a mysql program such as mysql workbench or phpadmin or something, how long does it take to execute the result?
I am not sure the delay has anything to do with the medium text editor, but to be sure, it would be good idea to run the query through mysql (or whichever database you are using) directly to see if it has a similar delay or not.
I have not seen a 40+ second delay in a server response before so I am just suggesting things to pin point where the issue may be coming from.
@UKRiggers
The question is, when you open the dev tools > Net tab > XHR and you click your button, do you see anything that loads there - like a server action?
Or does your page freeze and the delay is clientside?
When I click the Yes button, and you wait 30 seconds or so, then the text appears. Nothing appears or changes in the Network tab at all, so nothing in the XHR tab.
Teodor, the idea with these buttons etc on the form is that if say
drop-down menu A value is 51,
button D value is 291 and
button F value is 61
then add paragraph 14 from a DB table to the medium editor.
There would then be about 15 of these combinations or conditions that would then build up a large chunk of text within the medium editor. Some would match and some wouldn’t, so you may end up with 6 paragraphs that make-up this body of text.
So there is no wait/slowdown on the server side, right?
Does the page freeze (so you can’t select anything else while waiting)?
Doest the same happen if you directly bind the expression on the page, instead of using medium editor?
Hi Teodor, I have now uploaded it to the online server. When I run the page there, it still takes ages but this time I am getting lots of messages so will take a look at those.