Performance bottleneck diagnosis from profiler output

par fidji DeepSeek Anglais ~660 tokens
Extrait public Verrouillé
Is the profile valid (debug mode, warm-up, data size)? Top frames by self time and inclusive time, classify the cost (CPU, I/O wait, locks, allocation/GC, N+1), rank hypotheses, compute the ceiling gain with Amdahl before optimising…

À propos de ce prompt

Paste a flame graph, profiler table, EXPLAIN ANALYZE or APM trace with the code: the prompt first checks the measurement is trustworthy, then reads self vs total time, ranks hypotheses with evidence, estimates the possible gain with Amdahl’s law before you touch anything, and gives a before/after benchmark protocol. DeepSeek fits the numeric reasoning.

Exemple de résultat

Fourni par l'auteur
STEP 1 — Valid for CPU, but 38 % of wall time is outside the sampled stacks → capture a wall-clock profile too. Xdebug is listed in loaded extensions: disable it and re-measure, it can inflate PHP time 2–5×. STEP 2 — Hot path ReportController::show (100 %) → ReportBuilder::rows (81 %) → LineItem::getProduct (63 %, 4,812 calls, 0.53 ms each) → PDOStatement::execute (60 %) Reading: 4,812 identical single-row SELECTs → N+1 on products. STEP 3 H1 (strong): N+1 in getProduct(). Confirm: count queries per request (expect ≈ 4,800). H2 (weak): number_format in a loop, 4 % self time — not worth it. STEP 4 — Ceiling H1: p = 0.60, one batched query ≈ 30× faster → 0.40 + 0.60/30 = 0.42 → 4.2 s × 0.42 ≈ 1.8 s. Target 0.8 s NOT reached by H1 alone; remaining 40 % is in template rendering (to profile next)…

Fiche technique

Modèle
DeepSeek
Langue du prompt
Anglais
Pour qui
Backend and full-stack developers facing a slow endpoint, job or page with profiling data in hand
Longueur
~660 tokens (estimation)
Format livré
Texte du prompt, affiché en ligne après achat

Avis

Réservés aux acheteurs

Aucun avis pour l'instant. Seuls les acheteurs de ce prompt peuvent en laisser un.

Signaler ce prompt