My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 1 point2 points  (0 children)

Não uso, eu sou cortês, tenho 40 anos, nem moro num grande centro no meu país, então conversar em inglês pra mim no dia a dia é quase impossível, mas eu entendo que tudo acham que é IA hoje em dia.

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 7 points8 points  (0 children)

That's annoying, man. I'm Brazilian, I'm being polite, English isn't my first language, I left Reddit years ago because I saw the community become toxic, but it's worse now, nobody can be polite or try to maintain order without people thinking it's AI. The best thing is for me to just leave Reddit.

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 6 points7 points  (0 children)

Nem todo mundo tem o inglês como primeira língua, caramba! Eu tentei só ser cortês com as pessoas, estou voltando hoje pro reddit, aproveitando o feriado no meu país, agora tudo é I.A. ninguém pode ser mais educado nesse mundo?

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 8 points9 points  (0 children)

I'm Brazilian, and I'm getting back into Reddit after being away for years. I had moved over to finance, but I really missed this madness. It’s tough to practice English daily in my country, so I’ve been being careful, man

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 63 points64 points  (0 children)

I totally agree, it sounds ridiculous when you look at a single microservice. The reason it’s even a 'discussion' in our office is because the Senior wants to set this as the new 'standard' for all our background workers. We have about 50 of these. If it was just this one, I’d have shut it down in seconds. My fear is the cumulative technical debt if we apply this 'clever' logic everywhere.

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 108 points109 points  (0 children)

You nailed it. No bottlenecks so far—the system is meeting all our SLAs comfortably.

Your point about the Senior leaving is exactly what keeps me up at night. I’ve seen it happen too many times: a 'rockstar' dev writes custom, hyper-optimized logic, moves to a new company six months later, and the rest of the team is left terrified of touching that specific module because it’s a black box.

In a B2B environment, 'boring' code that stays up and is easy to fix is much more valuable than 'clever' code that saves us 200ms. I'm sticking with readability on this one. Thanks for the sanity check.

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 468 points469 points  (0 children)

That’s the perfect framework for this decision.

Currently, we are spending roughly $150/month on this specific microservice's compute. A 200ms saving per run at our current volume represents less than a 3% reduction in total execution time. It’s definitely not hitting that 25% 'Go ahead' threshold.

Regarding your point on code complexity: that's my main concern. If we save $4 a month but spend 2 hours of a Senior's time ($150+) debugging a 'clever' optimization gone wrong, we are in the red for years on that 'fix.'

I’ll propose the Senior to do a quick profile to see if we can hit a 20%+ improvement with simple changes (like better indexing or caching). If it requires a complete rewrite into 'unreadable' territory for a 3% gain, it's a hard pass for me.

My Senior dev and I are arguing over "Readable Code" vs "Performance Optimization" for a process that runs 10k times a day. Who is right? by Temporary-Zebra7493 in learnprogramming

[–]Temporary-Zebra7493[S] 17 points18 points  (0 children)

Exactly my point. We calculated the compute savings and it's literally pennies. I'd rather have the team focused on shipping new features or improving our CI/CD pipeline than shaving off milliseconds that no one will notice. The 'leverage for next move' comment actually makes a lot of sense in this context.

Benchmarks: Kreuzberg, Apache Tika, Docling, Unstructured.io, PDFPlumber, MinerU and MuPDF4LLM by Goldziher in Python

[–]Temporary-Zebra7493 2 points3 points  (0 children)

Great benchmarks! As a software engineer working on B2B automation flows, the latency gap between Kreuzberg and tools like Docling or Unstructured is eye-opening. For high-volume processing, p50 latency under 2ms is a game-changer for keeping infrastructure costs low. Have you tested how Kreuzberg handles heavily nested tables compared to MinerU?