GitHub only

Fix a slow API endpoint

Devin benchmarks a slow dashboard endpoint, profiles it, fixes the causes, and reports p50, p95 and p99 latency before and after.

Needs
GitHub
Starter
devin-demo-performance

Steps

  1. Enter your GitHub user or org. The links and the prompt on this page use it.
  2. Create your own copy of the starter repo. Open GitHub's new-repository page for devin-demo-performance, choose your account as the owner, keep the name devin-demo-performance, and click Create repository.
  3. Make sure Devin can access the new repo under Settings → Connections → GitHub.
  4. Start a session at app.devin.ai and paste the prompt below.

Prompt

Customers say the dashboard in https://github.com/<you>/devin-demo-performance is painfully slow. Make it fast, with proof.

Seed the realistic dataset (`npm run seed`) and measure the baseline with the repo's benchmark (`npm run bench`, report p50/p95/p99). Profile to find where the time actually goes (show the evidence: query counts, timings, a flamegraph or --cpu-prof output). Fix the root causes without changing response shape (existing tests must pass, add one that guards against regression). Re-run the identical benchmark and open a PR with a before/after table of p50/p95/p99 and RPS plus what you changed and why.

What to watch

  • It measures a baseline before changing anything.
  • The fix is backed by profiler evidence, not hunches.

You're done when

  • The PR has a before/after table of p50, p95, p99 and RPS.
  • Existing tests pass, plus a new one that guards against regression.
Next labMigrate a Java 8 app to Java 17