Hi, Normally my Wappler pages load fast, but recently whilst demoing a page via Google Meet, the load times were slow. I realised I needed the preloader to be added to the page.
So later I added the preloader, (preview is off) but when I open the page, it will not open, instead, the spinner is continually displayed. If I remove the preloader the page loads fast. Put the preloader back on the page and the page will not load and spinner is continually displayed.
Has anyone else seen this behavior, what have I forgotten to do? And yes, preview is off.
JUst tried a few things. In the Dynamic Attributes of the spinner I set it to only show if the main Form of the page is uploading. The page loads now but too fast now for the spinner to get a chance to show. I accept that. But another bad side effect has now occurred.
The page, which is longer than the physical screen, and normally can be scrolled up and down, will not scroll while the spinner is on the page.
Any suggestions?
Also, I just noticed that for these long pages, I do not have a right hand side scroll bar. Its never been there, but I have not noticed because I naturally scroll with the mouse. But the scroll bars should be present, How do I switch them on?
I can answer one: The preloader, in its default configuration, auto-hides if all SC on your page complete with 200 status. It could be that you have some SC which is failing?
Just thought I would let you know the results of your hint.
All my server connects are running fine, no problems in their coding
I have over 50 pages in my app now, the simple pages run the preloader as documented in Wappler, no problem. The heavy pages do not, the preloader seemed to get in a loop (no pun intended) .
The workaround was to stop all Server Connects from autoloading and explicitly load them in the App Load event. Then things worked like a charm.
I know it seems like a server connect problem has been moved from auto load to App Load to avoid upsetting the preloader, but all my server connects do run fine.
Do you need so many server connect components? You could perhaps look if you can combine some of the server actions into a single action, you can do multiple database queries in a single server actions and return them all at once which is often faster then doing each database query in a separate server action.
I am not why it would not work with autoload, but work when loading from load event.
It couuld be a timing thing.
Like you have discovered, there are ways to optimize when to load a SC.
What I also sometimes do is just keep one SC on auto load, and others get loaded on success event of that SC, and so on in a chain. But this depends highly on how your logic is set.
You can also make use of page flows with autorun to load SC conditionally on page load.