Optimizing 'do a search' - Reduce WUs - Calendar Loads

Hello everyone,

I have an application that relies heavily on a Calendar feature, which is the primary function of my app. However, every time users open the calendar, it requires loading all their appointments, which is putting a strain on my application. Users open the calendar multiple times a day, and currently, it consumes 50% of my WUs.

The calendar acts as the “home page” of the system, so every time a user logs in, it opens directly to the calendar. I’m using the Air Calendar plugin from Zeroqode.

Each time the page loads, I use a hidden RG element on the screen to retrieve the user’s appointments, as shown in the screenshot.

However, this query, triggered each time the page loads, is overloading my application significantly. The calendar is accessed multiple times a day by the same user and is also frequently updated, as users create, delete, and edit appointments throughout the day.

I need to find a way to optimize this query, but I’m not exactly sure how. I’m considering two alternatives:

  • Migrate the database to Supabase. However, this application has been in use for three years and has various workflows already set up, so the migration would be extremely risky and complex.
  • Use custom sets and an Appointment List field to fetch the most recent appointments. However, I’m not certain if this would be feasible.

Or, I’m not sure if it’s possible to save the search data in cache for a certain period to prevent Bubble from running the appointment query repeatedly.

One of the issues is that the calendar appointments are going to be modified often.

There are a lot of different things that can be done, but the issue likely to push back on any possible suggestions is that the appointments being modified so frequently. If not for that you could just use JSON in local storage.

Other ideas is to change UX/UI so only show a list of week or next 4 days instead of a month. But I think right now you are doing a two week period, 7 days before and after the selected date, so it wouldn’t be much of a change to switch to just show current events, meaning current date and maybe the next 6 days, but that of course would have UX implications that you might not be okay with.

Share screen shots of UX/UI for the calendar itself as well as appointments and how users modify it. Also share some details about how the users interact with this on a daily basis and why they interact it with it frequently. With more details, could give more suggestions.