Page reloading at random intervals

Hi All -

I have built a pretty heavy app for our company with data stored in Glide Tables. Having an issue where a page that gives a significant amount of information keeps reloading at random when our staff members are trying to enter in notes. It is becoming a problem as the notes get cleared every refresh. The refreshes are happening every 30 seconds or so. I know that there can be performance improvements in the tables, but is there a way to stop the page from reloading at random?

Thank you!

Does limiting the number of rows displayed help?

It is actually a page displaying information about a single row in a table. There are some list components filtering other tables, but they only display at max 5 rows.

A couple of questions:

  • are you using Glide Big Tables?
  • is there any Date math involved, especially using the special now value?

Hi Darren -

  1. No, all tables are regular Glide Tables
  2. There is indeed quite a lot of date math, and some of my Math columns use the now value. Does this impact performance?

Strangely the performance view of my columns in the table show all green, including the Math ones.

I have seen this cause similar issues to those you have described in the past.
The thing is, in Glide the “Now” value changes every 10 seconds, so any columns that reference this value will be recalculated every 10 seconds. Easy way to test is to make sure no components that are displayed on the screen are referencing any such columns, and then see if that resolves the issue.

2 Likes

Wow - I never would have thought of that! I’ll make that change and see if it works.

Do you know if there is any other way to use only today’s date in a Math column instead of using the now value?

The only other way I can think of now is to create a “Today” table with a single Date “Today” column, schedule a daily Write webhook every day at midnight to write the date into that column, and reference that as a Single Value throughout the app. I just don’t know if a Math column will be able to read it in a similar way to the now value.

If you’re only interested in the current date (and not the time), then I would convert it to an integer in YYYYMMDD format, eg with:

Year(Now)*10^4
+Month(Now)*10^2
+Day(Now)

The returned value will only change once every 24 hours.

I should say that under most circumstances referencing the Now value should be perfectly safe and should not have any significant performance impact. And it may not necessarily be the culprit in your case. I just offered it up because I have seen it at least once. I can’t recall the exact circumstances, except that the 10 second update was triggering a chain of computed columns to be recalculated on a large number of rows, which resulted in a visible impact on the user experience.

1 Like

This is extremely helpful. Thanks so much. Will test this all out tomorrow.

1 Like

One follow-up question: do you know if using the “Current time” selection in a Template column would yield the same refresh behavior as using Now in a Math column? It seems like I am using the former for a couple instances when I truly need the actual time by the minute.

Yes, I would expect it to be the same, since it drills down to the seconds level.

2 Likes