Create record action takes a long time first time it is run

I have a table with a list of records (course offerings) with a row action of “enroll”. When they click that action, a new record is created in a junction object connecting a contact to the course offering.

The functionality works, but the first time a course is enrolled in, the process take a while, like 5-10 seconds. However, subsequent additions don’t take nearly as long (1-2 seconds).

Any idea why the first one would take so long? This is being run from a public site page. Perhaps there’s an API connection lag, though there are query calls happening before this?

Thanks for any idea/insights.

Seth

Could it be that the first lookup to get the contacts for the junction take longer the first time, but if the query to get the contacts is the same, it may be cached in the back-end, so it’ll be quicker.

Contact for the junction is actually hard-coded since it’s a temporary contact until they go to the next page and register (which updates the contact).

I just noticed I had one unnecessary condition activation on a condition that was already activated, perhaps that was it. Things seem slightly faster. We’ll see what the client says. :wink: