Skip to content

Tags

#performance

Making software faster: profiling, benchmarks, caching and the fixes that actually mattered.

24 posts

Posts tagged #performance

  1. Article

    AI upscaling will not save your frame budget (if you are CPU bound)

    No, so, every second performance discussion now ends with "just turn on DLSS". Players say it, okay. Producers say it, less okay. Last month a producer said it in a meeting about our game thread at 21 ms. I almost had a stroke. What upscaling actually does Temporal upscalers (DLSS Super Resolution, FSR, XeSS, Unreal's own TSR) render the frame at a lower internal resolution and reconstruct a higher resolution image…

    Bartek Wójcik14likes11comments

  2. Question

    lambda cold starts with node 22: pay for provisioned concurrency or move the API to cloudflare workers?

    ok let me make a question pá. our API (US startup, i'm remote from lisboa) runs on AWS Lambda + API Gateway, node 22, bundled with esbuild, about 2 MB per function. users are mostly US east coast and brazil. problem: p99 on cold starts is about 1.4s and the product people see it in the dashboard every monday. options on the table: provisioned concurrency on the hot functions (finance did not love the number) move…

    Tiago Ferreira4likes8comments

  3. Question

    Django endpoint does 300+ queries, select_related vs prefetch_related confusion

    Hi, I am intern at a fintech, writing internal API in Django REST Framework. Endpoint /api/transfers/ returns 50 transfers and django-debug-toolbar shows 312 queries xD Models: Transfer has two ForeignKeys to Account (sender, receiver), Account has ForeignKey to Customer , and Transfer has ManyToMany tags . class TransferViewSet(viewsets.ReadOnlyModelViewSet): queryset = Transfer.objects.select_related("sender",…

    Kacper Nowicki13likes9comments

  4. Question

    Anyone running Laravel Octane on FrankenPHP in production? Memory and singleton horror stories wanted

    We are moving one high traffic client API (about 4M requests a day, mostly reads, Redis cached) from php-fpm to Octane with FrankenPHP. Staging benchmarks look great, p95 from 48ms to 14ms. But I have done this long enough to know staging lies. Setup: PHP 8.3, Laravel 11, Docker, 2 containers behind a load balancer. Questions for people who actually run it in production: Memory growth: do you set --max-requests ,…

    Ayesha Siddiqui5likes7comments

  5. Question

    React form library for very long clinical forms (200+ fields), what holds up?

    A small team I advise is building an assessment form for nursing homes. It has more than 200 fields in about 15 sections, many conditional fields ("if a fall in the last 6 months, then ask..."), and it must save drafts, because nobody completes it in one sitting. They started with controlled inputs and one big state object, and typing became noticeably slow on the tablets the staff use. I am not a frontend…

    Hannah Weiss2likes3comments

  6. Article

    offline first for bad networks: what a delivery rider app taught us

    last year we rebuilt the rider app for a logistics client (react native this time, the client already had a RN team). riders move between areas where network is good, then 2G, then nothing, then a filling station wifi that says "connected" but nothing loads. the old app treated network as always on and riders were losing deliveries, double submitting, and calling dispatch to confirm everything manually here's what…

    Tunde Adebayo5likes8comments

  7. Question

    Postgres count(distinct) on 80M rows very slow, any trick?

    Daily active customers query take ~40s, dashboard timeout: select date_trunc('day', created_at) as day, count(distinct customer_id) from orders where created_at >= now() - interval '90 days' group by 1 order by 1; Table ~80M rows, index on created_at. Postgres 15. EXPLAIN show big Sort spilling to disk. Tried increase work_mem to 256MB, bit faster but still 25s. Is count(distinct) just slow in Postgres? Thinking to…

    Lin Wei2likes3comments

  8. Article

    We replaced an LLM feature with a regex and nobody noticed

    This is the regex post I threatened in June. Context: one step of our support pipeline extracts identifiers from inbound emails: order numbers, return authorisation (RMA) codes and carrier tracking numbers. Last year, in the general enthusiasm, this step was moved from a pile of old code to an LLM call: "here is an email, return JSON with any order number, RMA code and tracking number you find". It worked. It demoed…

    Dana Kowalski84likes37comments

  9. Article

    We moved the Pay button to the bottom and abandoned payments dropped 11%. Payment UX notes for cheap Android phones

    Our test phone is a Rp1,5 juta Android: 6.5 inch 720p screen, 3GB RAM, an old mid-range chip. Most of our users have something like it. Most of our designers have a recent iPhone. Ya ampun. Here is what we changed in our payment flow, with numbers. 1. The button moved, abandonment dropped Our Pay button sat at the top right, under the amount, because it looked nice in Figma. On a 6.5 inch phone held in one hand on a…

    Dita Anggraini31likes11comments

  10. Article

    Finding jank on a Rp1,5 juta phone: what actually worked for our Compose feed

    Promised Trey a proper post after his budget Android review, so here it is. Context: big app, Compose UI, and most of our users are on phones that cost Rp1,5 to 2,5 juta (roughly 90 to 160 USD). Our feed felt "fine" on our flagship dev phones. On the cheap test device it was not fine. 1. Measure first, on the right phone Quick check, no setup: adb shell dumpsys gfxinfo com.example.app reset # scroll the feed for 30…

    Dita Anggraini22likes9comments

  11. Article

    volatile is not a lock: 4 ISR bugs I have personally shipped to pump controllers

    All four of these went to the field in products with my name in the git blame. All four passed bench testing. Sharing so you can ship different bugs. Bug 1: the missing volatile bool adc_done = false; /* BUG: not volatile */ void ADC_IRQHandler(void) { adc_value = ADC1->DR; adc_done = true; } void read_adc(void) { start_conversion(); while (!adc_done) { } /* at -O2 this becomes while(1) */ adc_done = false; } The…

    Karthikeyan S19likes10comments

  12. Article

    Your Go service has 600 Postgres connections and uses 6 of them

    Last month a routine scale-up took down our orders database. Not CPU, not disk. Connections. Postgres said FATAL: sorry, too many clients already and every service that touched it fell over together. How we got there 40 pods of one Go service, each with a pgx pool. Nobody had set MaxConns , so pgxpool used its default: the larger of 4 and runtime.NumCPU() . Our nodes have 16 cores. 40 times 16 is 640 possible…

    Danny Cho22likes8comments

  13. Question

    How do you stop designers from putting logic on Tick in every Blueprint?

    No, so. New project, Unreal 5, small team (6 programmers, 9 designers). Designers are great, they build fast. Problem: every Blueprint they make has Event Tick with something on it. Checking distance to player. Rotating a coin. Updating UI text every frame. We have 400+ actors in the level, game thread is 19 ms on target, and I measured 6 ms of it is Blueprint Tick. I tried: Talking about it in the meeting. Worked…

    Bartek Wójcik5likes11comments

  14. Experience

    Le build du thème et le bourguignon avaient le même temps de cuisson (j'ai fini par réparer les deux)

    Petit retour d'expérience un peu idiot mais vrai. Depuis 2015 je fais des sites WordPress et WooCommerce pour des boulangeries, des vignerons du coin et des gens pressés. Je travaille de chez moi, à Nantes, et mon bureau est à trois mètres de la cuisine. Donc depuis des années j'ai une habitude : je lance le build du thème, et je vais touiller quelque chose. Le problème, c'est que mon build est devenu de plus en…

    Julien Lefèvre3likes7comments

  15. Article

    Flutter num Android de 700 reais: o que eu mudei pro app parar de engasgar

    mano, vou contar uma vergonha. nosso app (fintech: extrato, pix, cartão) tinha nota 4.6 na App Store e 3.9 na Play Store. e a gente achava que era "usuário de Android que reclama mais" kkkkk. aí alguém finalmente abriu o analytics: mais de 60% dos usuários Android tinham celular com 2 ou 3 GB de RAM. e o time inteiro testava em iPhone e Pixel. compramos 3 aparelhos de entrada (o mais barato saiu uns 700 reais) e…

    Thiago Valadares10likes9comments

  16. Article

    flutter on a 2GB android phone: what actually made our app usable

    so we build a delivery and payments app for a client here in lagos and most of their users are on phones with 2 or 3GB ram, android 9 to 11, storage almost full because of whatsapp media. our app was "smooth" on the dev team phones and absolute garbage on the real ones. here is what moved the needle for us, roughly in order of how much it helped 1. stop judging performance in debug mode sounds obvious but half the…

    Tunde Adebayo4likes5comments

  17. Article

    Flutter apps for firewall season: making your app usable when Pakistani internet is crawling

    Yaar, if you build apps in Pakistan you know the seasons. Summer, monsoon, wedding season, and firewall season. When the internet slows down "for reasons", VPNs crawl, WhatsApp images do not load, and my clients in Dubai think our app is broken. Our app is not broken. The pipe is. So this is what we changed in our Flutter apps. We are a two person studio, the clients are in Dubai and Riyadh, but most of our test…

    Hamza Butt14likes11comments

  18. Article

    The goroutine leak that took three weeks to find (the fix was four lines)

    One of our Go services gained about 40 MB of memory a day. Nobody noticed, because we deploy every day and a deploy restarts every pod. Then came a holiday change freeze. Twelve days without a deploy. On day nine the pods started getting OOMKilled, one by one, during the busiest week of the year. Finding it The service already imported net/http/pprof on an internal port, which is the single best decision anyone made…

    Danny Cho35likes11comments

  19. Article

    The index that made our query slower, and other things EXPLAIN ANALYZE told me

    Short version: someone added an index "because we order by that column", and the dispatcher dashboard went from 40 ms to 9 seconds for our smallest depots. The someone was me. I found out on the bike home, which is 14 km, which is enough time to stop being angry at yourself. The query SELECT id, reference, created_at FROM shipments WHERE depot_id = 42 AND status = 'pending' ORDER BY created_at DESC LIMIT 50;…

    Bram Verhoeven41likes13comments

  20. Article

    Building APIs for users on 2G, prepaid data and phones from 2017: 20 things I learned the expensive way (1/20)

    1/ Your users pay for every megabyte. Prepaid, in a currency that may have lost value this year. Every KB your API sends is money out of their pocket. Start there and most of this thread follows. 2/ Test like your users live. Chrome's "Slow 3G" preset is a holiday. On a Linux box between your test phone and the internet: sudo tc qdisc add dev eth0 root netem delay 400ms 100ms loss 2% rate 400kbit # remove it again…

    Achieng Owino47likes16comments

  21. Experience

    The Dubai client who wanted us to rewrite in Node 'because PHP is old'

    Story time, because this happened again this month and I want to have a link to send next time. Logistics client in Dubai. Laravel app we built in 2021, about 40k shipments a month, drivers, tracking page, invoices. They hired a new CTO from a big company. First meeting: "PHP is old, we need to rewrite in Node, NestJS, microservices. How long?" I did not argue. I said: give me two days to profile, and I will give…

    Ayesha Siddiqui20likes11comments

  22. Article

    16.6 ms is not a lot of time: frame budget for people who never shipped a game

    No, so. Every week somebody in our Discord asks "why my game is 40 fps, I have RTX card". This post is the answer I will link from now on. The budget 60 fps means you have 16.67 ms for everything. 30 fps means 33.3 ms. 120 fps means 8.3 ms, good luck. And "everything" is not one thing. In Unreal you have mostly three things running in parallel: Game thread : gameplay code, Blueprints, Tick, animation logic, AI.…

    Bartek Wójcik21likes11comments

  23. Article

    Your Laravel app is not slow. Your loop is.

    A Dubai client called last month. "The admin is slow, maybe we need a bigger server?" The orders page took 6.1 seconds. I opened Debugbar and the query counter said 1,214 . For one page. Of 50 orders. The server was fine. The loop was not. The code (simplified, but not by much) // OrderController@index $orders = Order::latest()->paginate(50); {{-- orders/index.blade.php --}} @foreach ($orders as $order) <tr> <td>{{…

    Ayesha Siddiqui16likes11comments

Get the best of Dynamo Geeks weekly

One email each Monday with the most useful posts. No spam; unsubscribe in one click.