Huge Delay Loading From Database in Wappler 6.8.0 c/w Wappler 3.9.7

======== TEMPLATE BUG FORM ========

Wappler Version : 6.8.0 - without using project updates made available since then.
Operating System : Any
Server Model: PHP 8.3
Database Type: MySQL
Hosting Type: WAMP or AWS

Expected behavior

What do you think should happen?

When loading the same server action which downloads a significant amount of data, I would expect my Wappler 6.8.0 / PHP 8.3 based app to load the data in a similar timeframe to my Wappler 3.9.7 / PHP 7.4 based App.

Actual behavior

The Wappler 3.9.7 / PHP 7.4 based App loads the data in a couple of seconds.

The Wappler 6.8.0 / PHP 8.3 based app takes 30-60 seconds to load the same data.

How to reproduce - Wappler 6.8.0 Based App

  1. Visit my Wappler 6.8.0 based app at WA app - Workshop Angel
  2. Open the Dev tools, Network tab.
  3. Log into my app with the login email contacts1000@workshop-angel.com (password will be DM'd to Teodor and Patrick)
  4. Note that the final server action to be called is contacts.php. When it is called, it seems to complete in the Network tab with a download size of 41kb. However the app remains in a none functioning state - there is no hover available over the main menu, those menu items don't work, and the spinner is still rotating, showing that the contacts.php server action has not yet reached the done state.
  5. After about a minute, the server action suddenly shows a downloaded size of 220k and everything now works.

Running this experiment on my local WAMP setup (running PHP 8.3) shows the same behaviour, so I am convinced it is not something to do with my AWS server.

How to reproduce - Wappler 3.9.7 Based App:

  1. Login with the same username/password to the 3.9.7 based app at WA app - Workshop Angel
  2. The spinner finishes and the app becomes usable after a couple of seconds.

(Both AWS servers access the same RDS database and have the same CPU/Memory configuration).

To See it Relates to the Contacts data size:

  1. Login to the 6.8.0 based app with email contacts65@workshop-angel.com.
  2. The app becomes usable after a couple of seconds.

Could This Be Related to Redis?...

A discussion going on about a similar issue where some very helpful Wapplers are wondering whether it is to do with Redis somehow being set for my project.

Redis is off for all of my targets, but doesn't appear in my Server Connect Settings... could this be anything to do with it? :thinking:

Have you tried running the 6.8 version of your Application on PHP 7.4? Just to further narrow it down...

Obviously I can't test this as I don't have login credentials, but I had a similar problem with my dashboard on data heavy pages. Your login page on both versions opens instantly.

Turns out the problem was 'HP Wolf' running in the back ground. We removed that from our staff Windows computers and it is blazing fast now. Might be worth a chance to try disabling any security apps you may have running on your machine(s).

I registered for a test account (feel free to delete Company Wappler Test). I couldn't find a way to delete the account.

But first off I want to say very freakin' well done! This project would make a great showcase for the monthly meet ups. Great job dude!

However, and this is probably a good thing, it all worked very fast for me. Of course I was only viewing the test data but everything was instant for me.

1 Like

I checked the page and there is some long running JavaScript blocking the page. Did some debugging and found that there is a flow that does a lot of datastore inserts. With App Connect 2 data changes are directly updated within the DOM and that happens now after each insert and causing the browser to freeze up for some time. In App Connect 1 you didn't have this problem, the DOM was updated with a delay.

To fix the issue you should do the inserts in a batch operation. Add startBatch action before doing inserts and then endBatch when it is finished.

1 Like

@patrick , you superstar, thank you!

I had actually thought of that last night and believed I'd tested it with the datastore part disabled... but maybe at the end of a long day I'd forgotten to hit save or something... :roll_eyes:

Just disabled it now and it loads beautifully...

I'll go play with the batch insert!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.