Remix.run Logo
▲ tripledry 2 hours ago

Genuine question, is this a common problem people see out in the wild? In my dayjob(s) I've basically never seen major slowness that comes from using something like nodejs / python, the bigger culprits have been network / db / bad architecture or code.

▲andyferris an hour ago | parent | next [-]

Yeah, Python is one I where I find moderate amounts data can be a pain - I end up tempted to move CPU work to the database or precompute more things, and it’s hard to get the advantages of single binary programs (for deployment, startup time, etc).

(For big data you can use Python to drive some native code frameworks - it is good at that, for tiny data it’s irrelevant because there’s not much to do, but the moderate case gets awkward).

▲chrismorgan 42 minutes ago | parent | prev | next [-]

Performance is broader than just slowness; it’s also CPU and memory usage, things which will force you to scale horizontally (multiple machines) much sooner.

In mid-2013, NewsBlur described in some detail their deployment and statistics. Python/Django, 48 servers. I confidently calculated that, with implementation efficient, one would be sufficient, though with little headroom, and further vertical scaling might have started running into I/O limitations. (I doubt a single server would be possible any more.)

It’s popular to scale horizontally far earlier than you actually need to. And if you can commit to sticking with vertical scaling (single big machine), you can simplify (and further speed up) things enormously.

I don’t know about now, but five years ago HN ran on a single server <https://news.ycombinator.com/item?id=28479595>, though with a standby machine also present since 2017ish.

▲FartyMcFarter 2 hours ago | parent | prev [-]

Yes. Python is usually 10-100x slower than languages like C, C++ or Rust. If your program is CPU bound, this shows up very obviously. If it isn't, you may never notice at all.

Imagine being able to use only 1% of the machines you used to require, by migrating away from Python. This is very realistic for companies doing heavy computational work.

▲cadamsdotcom 42 minutes ago | parent | next [-]

What you're saying is valid too; but, the post you're replying to implied most slowness is network (i/o bound) or bad architecture (accidental cpu bound, fixable by tech debt cleanup).

▲FartyMcFarter 40 minutes ago | parent [-]

That post was also asking if other people have seen language mattering. In the places where I've worked programs are often CPU bound. Places like these are why compiled languages are still alive and kicking.

I'm not denying that domains exist where being I/O bound is a thing. For those cases Python can be a fine choice.

▲cadamsdotcom 7 minutes ago | parent [-]

We all have different lenses on the makeup of the entire set of software out there, it's likely you're coming from that experience and the other post was coming from experience mostly with i/o bound software.

For cpu bound stuff the language makes potentially an enormous difference; but then you get to trade off: eg. if you're not gonna need a fast language you are free to choose based on other considerations.

Might still both pick the same language though ;)

▲ an hour ago | parent | prev [-]
[deleted]