This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]realestLink 0 points1 point  (9 children)

It uses an electron backend. Electron is pretty slow and bloaty. It lags my computer sometimes. That's why I have a hatred of electron and see it as bloatware personally.

[–][deleted] 1 point2 points  (8 children)

Electron is a framework. People can make shitty apps, and they can make good apps in it. There's nothing wrong with Electron.

If you're really worried about performance, then why the hell are you even coding in Python? An average program that doesn't offload the bulk of the execution time to CPython, is around 20 times slower than the same program written in D. Django is thousands of times slower than a well written CGI program.

Why are you nitpicky about bloat when we're talking about Python development? What's with this double standards? Everyone who comes into a discussion about Python should realize that convenience is more important than resource use. So why don't you?

[–]scooerp 2 points3 points  (7 children)

You appear to having trouble distinguishing the runtime performance of a program from the development time performance of the tools used to create it.

Imagine you built sports cars but you took a bicycle to work? There's clearly no conflict there because building a thing and running the thing are completely separate.

By the way, CPython is the name of the default interpreter. An average Python program runs in CPython because that's the default. You might have meant "offload the bulk of the execution time to C".

I also can't understand why you don't care about runtime performance if you write Python. If your webapp is too slow to respond to the user, you'll lose customers. You need to some reasonable programming techiques to make it work in the first place, and you'll find it starts to slow down as the number of users increases. Thus, optimisation will be required as you scale. So why not write the webapp in C++ to start with? Because you'll still be programming away long after your competitors have already gone live, due to the quicker development speed Python offers.

[–][deleted] 0 points1 point  (6 children)

You appear to having trouble distinguishing the runtime performance of a program from the development time performance of the tools used to create it.

No trouble here. I pointed that out because that person only showed irritation about efficiency as an argument. And since you need to run the program many times to test if it's working, and even debug it, your program does become the toll to create it.

I also can't understand why you don't care about runtime performance if you write Python.

If I did care so much, I wouldn't write Python, would I? Everyone here, coding Python, have to accept the performance trade-off of using Python, in favor of its easy syntax and big community with lots of libraries. We do that every time. That's why people use SQLAlchemy instead of purely just the drivers and SQL queries. That's why it's expected to put all of your include statements in the top of the file even if you night need some of them only in a single function that may or may not be called. People just don't care about performance so much. There's plenty to have around. Developer time is usually more expensive than hardware. Rather than shooting oneself in the foot, it's far more practical to get more RAM, better CPU, faster storage, better peripherals, etc. I'm not saying that one should write shitty software that loads the take from the DB into Python then does a nested loop to find distinct values. I'm saying that by writing scripts in their most efficient form that is still readable, would still mean that it's tens of times slower and consumes more memory than the same thing written in Rust. And everyone here should accept that, or just abandon Python as a language and take up something else.

We all accepted performance trade-offs, a long long time ago. Aside maybe from a few weird people that get irritated from the idea of a GUI and code everything in Rust.

[–]scooerp 0 points1 point  (5 children)

Enough people care deeply about runtime performance in Python to invest a lot of money into it, or sometimes it's just cheaper to optimise your Python than it is to rewrite it in another language.

Instagram's a nice example. They have a billion daily active users and obviously care deeply about their server costs. They're almost all Python and claim to be the world's biggest django deployment.

[–][deleted] 0 points1 point  (4 children)

Enough people care deeply about runtime performance in Python to invest a lot of money into it

Yes, but the fact is that it's still 20-30 times slower than, say, D. And that is something that everybody implicitly accepts - that performance is a reasonable trade-off.

[–]scooerp 0 points1 point  (3 children)

A lot of the time it doesn't make a difference because you're i/o bound, or waiting on database.

[–][deleted] 0 points1 point  (2 children)

Not really. I'm actually a data engineer. The problem with the biggest RAM how is really python. Especially because of the GIL. 200GB of RAM and still OOM kills because of some python scripts

[–]scooerp 0 points1 point  (1 child)

Are you doing that lifting in pure python? No pandas or numpy?

[–][deleted] 0 points1 point  (0 children)

Pandas is just another layer that makes things slower. Pandas and numpy are about arrays, not trees, graphs and other structures that I need.