I’m using the Mailto Links Pack by @Eric_Koleda in one of my Docs. I had the feeling it was slowing things down since I often saw the “Syncing…” icon in the top. Today I ran an analysis and my feelings seem to have been confirmed:
All top 3 items are dead-simple hyperlinks and they take waaaaay more time than the pretty complex formulas that come after them. And the strange thing is: they drag down calculation times even when I’m the only one on the Doc on a tab without any link to those formulas.
Has anyone else noticed that behavior? And found a solution?
I guess I could just use “copy to clipboard” buttons for addresses, object and email body (which I already have as a backup) but the one-click solution is pretty neat…
Instead of having a formula constantly recalculating you can consider setting up an automation in the tables to just store the value when the ‘Email’ column is changed or whatever other situation that fits your use-case.
Thanks Pablo. Thing is, they appear as tables in the analysis but they’re dead simple canvas formulas that go like =Hyperlink(MailtoLink(f_MyAddress,f_MyObject,f_MyBody)) where f_MyAddress etc. are dynamic text formulas. It’s just the same logic as when you use a formula in a callout to say “You have XX tasks assigned to you, out of which YY are due”: I wouldn’t want to use automations to update that text, and I don’t understand why I would need automations in my scenario either. I’ll give it some more thoughts, though. Thanks again!
A single canvas formula taking 15 seconds to recalculate does sound wierd, specially if the formula itself is simple. Even if the underlying data is very complex, the calculation time should appear under the data source, not this canvas formula.
Of course Automations doesn’t sound like a good fit in this case.
Have you tried to drop the pack and build the formula just with CFL? It looks quite simple to implement with EncodeForUrl().
For anyone else running into that issue, EncodeForUrl works, but I had to first use plain text for the “mailto:” part, otherwise Coda created a weird link based on the Doc Page URL and then the result from EncodeForUrl.
So the final formula in my case is something that looks like this:
Hyperlink(Concatenate("mailto:",f_MyAddress,"?subject=",EncodeForUrl(f_MyObject),"&body=",EncodeForUrl(f_MyBody)),"click to send mail")
Late to the party but yeah, any call to a pack requires a round trip to the Coda servers where it is processed. And while that process is ongoing, all calculations in the doc are blocked.
So yeah, it’s much better to use CFL-based solutions over pack-based solutions whenever possible. While writing certain algorithms in JS/TS is much easier than in CFL, there’s this overhead of calling those lambdas on the backend.