Data load on Page Load is slow

Hi All,

I have a flying club app which works quite well however I am experiencing a performance issue now that the database is growing:

When a user connects for the first time of the day, my App will show to the user a PopUp if the flight time for the last 3 months is below a certain amount.

The Page load Workflow looks like this:

When Page is loaded and if first connection -> “Search For” sum of flight time in the “Flight database” based on the “Current User ID” -> if condition met then Popup is shown.

The problem is that at the time the workflow runs the search is not yet completed in the background resulting in my popup showing every time. (“Warning, no flights in the last 3 months”)

Basically for the first 30 seconds or so (Sometimes less sometimes more) the “search for” returns nothing. My guess is that it takes some time to load the “Flight Database”.

I have read the performance Q&A but can’t find answer to my query.

Amyway we can speed up the loading of a specific database upon page load ?

Thanks to all

I was dealing with very slow page load times as well with several “do a search for…” events happening. I ended up completely rethinking my data structure and it seems to work much faster now.
Have you considered adding a field in the user database called Flights that is a list of Flights? Whenever the workflow is run that creates a new flight you would add that flight to the user (assuming the number of flights wouldn’t be huge).
Then you could avoid the Do a search for Flights where user is current user and just do:
page is loaded> current users Flights’s Flight Time’s sum is greater than X then show a group or popup.

You could even consider using the above as a visibility condition for an element instead of a “page is loaded” workflow.

Let me know if you’d like more info.

Thanks for your feedback.

Adding flights to user is indeed a good idea but then if I delete a flight from the flight database a I would have to delete it from the user database…

Hence I try to work with limited amount of db’s…

This topic was automatically closed after 70 days. New replies are no longer allowed.