A SaaS client's dashboard was taking 4.2 seconds to render every time a user logged in. The user ...A SaaS client's dashboard was taking 4.2 seconds to render every time a user logged in. The user ...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
A SaaS client's dashboard was taking 4.2 seconds to render every time a user logged in.
The user base was growing, but user retention was dropping. Users were literally refreshing the browser thinking the app had frozen.
Here is how we diagnosed and fixed the issue in a single afternoon dropping query times from 4,200ms to 85ms:
The Diagnosis (Laravel Debugbar & Telemetry) We ran a query trace on the dashboard endpoint. The culprit? A classic nested Eloquent loop pulling customer transaction metrics. Instead of 1 optimized query, the server was executing 180+ database queries per request (the dreaded N+1 problem).
The Fix: Eager Loading & Database Aggregates
Replaced individual loop queries with Eloquent's with() for eager loading.
Replaced memory-heavy PHP array manipulation ($user->orders->sum()) with native database aggregation using withSum() and withCount().
Strategic Indexing We checked the MySQL execution plan (EXPLAIN) and found the transactions table was running full-table scans across 500,000+ rows because user_id and created_at lacked composite indexing. Added a single composite index: $table->index(['user_id', 'created_at']);
The Result:
Database Queries: Reduced from 184 to 3.
Page Response Time: Dropped from 4.2s to 85ms.
Server Load: CPU usage dropped by 65%.
You rarely need expensive server upgrades or a complete system rewrite to fix a slow application. Most of the time, you just need to fix how your code talks to your database.
How fast is your primary user dashboard loading right now?
What if anyone on your team could ask your data a question and get a live dashboard back in under a minute?
That was the brief. Business users were locked out of their own data. Every question waited on someone who could write SQL, data sat across disconnected systems, and security teams refused to send sensitive records to third-party AI tools.
So we flipped the model. Instead of moving enterprise data to an AI product, we moved the AI analytics product into the customer's AWS account.
What we built:
• Natural-language querying that turns plain-English questions into governed dashboards in under 60 seconds
• Federated queries across SQL and NoSQL sources through Trino
• AI query generation on AWS Bedrock Agents, with Bedrock Guardrails keeping model output in bounds
• Dashboards generated with Apache Superset, plus proactive anomaly and trend alerts
• A white-label React widget that embeds in any product
• Role-based access, row-level security and enterprise SSO enforced at every layer
The result:
Zero data egress. The whole platform deploys inside the customer's VPC and is live on AWS Marketplace.
Building AI features for a data-heavy or regulated product? Let's talk about doing it without your data leaving your cloud.
Renewable energy production changes constantly, and grid operators need faster ways to understand what is happening across load, generation, storage, and market conditions.
Gridora explores a SaaS dashboard experience built for energy forecasting and balancing.
The dashboard surfaces forecasted peak load, curtailment risk, available storage, spot market price, generation sources, and recommended next actions in one clear workspace.
Natural imagery, soft neutral surfaces, and green accents connect the interface to the renewable energy context while keeping the product practical and easy to scan.