Komutla Performans İyileştirme
Yapay zekadan yavaş çalışan yolları bulmasını isteyin.
Komutla Performans İyileştirme, CoddyKit'te ücretsiz bir Vibe Coding dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Vibe Coding öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Vibe Coding kursu toplamda 4 dersten oluşur.
Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.
Measure, Don't Guess
Performance work fails when it starts with hunches. The fastest way to slow yourself down is to optimize code that was never the bottleneck.
Your assistant is excellent at optimization, but only if you point it at real evidence. This lesson is about turning measurements into precise prompts.
Profile First
Before asking for speed, ask for a profile. Have the assistant instrument the slow path and tell you where time actually goes.
Give it the symptom and the constraint, and let it propose where to measure instead of guessing at fixes.
The /search endpoint takes about 2 seconds under load. Before optimizing anything, add profiling to break down where the time goes: database queries, serialization, and external calls. Tell me which segment dominates and propose where to focus.Hunt the N+1
The most common performance killer in a vibe-coded app is the N+1 query: a loop that fires one database call per item. It feels fine with ten rows and dies at ten thousand.
Ask the assistant to find these patterns and collapse them into a single batched query or a join.
Scan the data-access layer for N+1 query patterns where we loop over results and issue a query per item. Rewrite the worst offender to use a single batched query or a join, and show the before/after query count for a list of 100 items.Index the Right Columns
A query that scans the whole table is slow no matter how clean the code is. The fix is usually an index on the columns you filter and sort by.
Share the slow query and let the assistant read the execution plan and recommend a targeted index, not a blind one on every column.
Here is a slow query and its EXPLAIN output. Recommend the minimal set of indexes to remove the sequential scan, explain the trade-off on write performance, and give me the exact migration to add them.Cache What's Expensive
Some results are costly to compute and rarely change. Caching them trades a little staleness for a large speedup.
Ask for a cache with an explicit invalidation strategy, because a cache you cannot invalidate correctly becomes a bug factory.
Add a cache layer for the product-catalog response, which is expensive to build and changes a few times a day. Use a short TTL plus explicit invalidation when a product is updated. Explain exactly when stale data could appear and how long it lasts.Move Slow Work Off the Request
Sending an email, resizing an image, or calling a third-party API inside a request makes the user wait for work they don't need to see finish.
Have the assistant move that work into a background job so the response returns immediately and the task runs reliably with retries.
The signup request blocks while sending a welcome email and provisioning resources. Move that work into a background queue so the request returns immediately. Add retries with backoff and a dead-letter path for tasks that keep failing.Paginate and Stream
Returning ten thousand rows in one response is slow to build, slow to transfer, and slow to render. Products page through data instead.
Ask for cursor-based pagination for large lists and streaming for large payloads so memory stays flat as data grows.
The list endpoint returns the entire table in one response. Add cursor-based pagination with a sane default page size and a stable sort. Make sure memory usage stays constant regardless of total row count.Set a Budget
Optimization without a target never ends. Define a performance budget so you know when you're done and when you've regressed.
Express it concretely: a p95 latency, a payload size, or a query count, and ask the assistant to keep changes inside it.
Set a performance budget for the checkout flow: p95 latency under 300ms and no more than 5 database queries per request. Review the current flow against that budget and propose the smallest set of changes to meet it.Beware Premature Optimization
Not every slow thing is worth fixing. Optimizing a path that runs once a day wastes effort and adds complexity that bites you later.
Ask the assistant to weigh impact against risk, and to leave clear code alone when the gain is negligible.
Here are five optimization ideas from the profiler. Rank them by expected impact versus the complexity and risk each one adds. Recommend which to do now, which to defer, and which to skip because the gain is too small to justify.Verify the Win
An optimization isn't real until it's measured again. The same profile that found the problem should confirm it's gone, with no new regression elsewhere.
Have the assistant re-run the benchmark and report the delta honestly, including any path that got slower.
Re-run the benchmark on /search after the changes and compare to the baseline. Report p50 and p95 before and after, the query count delta, and flag any other endpoint that regressed as a side effect.Performance Is a Loop
Speed is never finished. As usage grows, new bottlenecks appear where there were none before.
The durable skill is the loop itself: measure, target the biggest cost, change, and re-measure. Keep your prompts anchored to data and the loop keeps paying off.
Quick Check
Test your understanding of prompting for performance.
Recap
Performance by prompt means feeding the assistant evidence, not guesses. Profile first, then target N+1 queries, missing indexes, expensive uncached work, and blocking tasks that belong in the background.
Set a budget, verify each win with the same benchmark, and treat optimization as a continuous loop driven by measurement.
Sıkça Sorulan Sorular
“Komutla Performans İyileştirme” dersi ücretsiz mi?
Evet — “Komutla Performans İyileştirme” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Vibe Coding kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Vibe Coding kursu toplamda 4 dersten oluşur.
“Komutla Performans İyileştirme” dersinde ne öğreneceğim?
Yapay zekadan yavaş çalışan yolları bulmasını isteyin. Vibe Coding ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.
Vibe Coding öğrenmeye başlamak için deneyim gerekli mi?
Önceden deneyim gerekmez. CoddyKit'te Vibe Coding, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.
“Komutla Performans İyileştirme” dersi ne kadar sürer?
Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.
Bu Vibe Coding dersinde kod yazıp çalıştırabilir miyim?
Evet. Her Vibe Coding dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.
Bu kursun tüm dersleri
- Prototipten Ürüne
- Komutla Performans İyileştirme
- Günlük Kaydı ve Ölçümler Ekleme
- Olaylara Yanıt Verme