How to avoid expensive virtual column expressions

「三人寄れば文殊の知恵」

Glad to hear you got inspired.

3 Likes

Thanks to @Aleksi, @tsuji_koichi, @Marc_Dillon, @Grant_Stead, @Steve, @MultiTech_Visions, @GreenFlux and @Suvrutt_Gurjar! (I hope I’m not forgetting someone :wink: )

Your advice helped me speed up my sync time with almost no decline in user experience:

I say “almost no decline” because I got rid of a couple of very minor features that were not important but were difficult to implement without expensive virtual columns.

Actually, the sync times in the image above are a bit faster, I think, than what I can expect most of the time – I’ve noticed that sync times vary with conditions. Still, I think my app is better now and appreciate the valuable help. :slight_smile:

By the way, here are some related threads where I also received help with my little project of speeding up my sync times:

Actually, I haven’t gotten an answer to this one yet. Any thoughts?

9 Likes

Wow, nice work!
It’s a big step, and I remember when I did this to an app for the first time. Solid work going from 20 seconds to sub 10!

4 Likes

Hey everyone, sorry for hijacking this wonderful thread, but i have some questions about this:

1-Does that mean i can go ham on the reports with the select() formulas?
2-In the case of email workflows, does the use of many formulas affect the time it takes for the user to receive the email?

I have been trying to balance my virtual columns inside my apps while trying to minimize the amount of computation done in the reports, but if that isn’t necesary at all then im gonna get back a few seconds off my sync times. Slo-mo Parrot

2 Likes

Yes.

An expression always has to be processed. A single expression on a single record doesn’t take very long, but that duration starts to build up when you have hundreds or thousands of records.

The point here is that in a VC, that expression will need to be processed for EVERY record, upon EVERY sync. In a workflow, it will only be processed for one single record at a time, and only when the workflow fires. Which in 99% of cases, that amount of time should be wayyyy lower.

4 Likes

I see, thanks for the answer @Marc_Dillon. I can think of 5 virtual columns that will meet their demise very soon just from the top of my head, this is game changing for me !

4 Likes