Why is this customer experiencing 10+ sec load times on every page?

Why, of course it’s because we have an analytics plugin installed that emits some crap for Google’s data layer on every page, including “customerLifetimeValue”. This value is calculated by naively loading all of her past orders (150+) from the DB and summing their total prices. ORMs go brrr×rrr×rrrrr 😒

Sign in to participate in the conversation
Doma Social

Mastodon server of https://doma.dev.