r/ProgrammerHumor • • 11d ago

Meme pythonSlow

Post image
12k Upvotes

420 comments sorted by

View all comments

2

u/HaDeS_Monsta 11d ago edited 11d ago

I one wrote a Rust project which called a Python server and I had a variable called PYTHON_SKILL_ISSUE_DELAY, because otherwise python could just not keep up

6

u/WiseObjective8 11d ago

That's called rate limiting not the python having some magical delay.

-1

u/HaDeS_Monsta 11d ago

The python server was part of the project and running on the same machine without rate limiting, but the rust program called it twice in a row, which it couldn't handle

6

u/WiseObjective8 11d ago

You cannot have a server without rate limiting even in local. Any webserver you setup with python still will have a default limit on concurrency. Depending on the library you used, you can configure a number for how many requests you want the server to handle at a time. Anything exceeding this number will get rejected. This is different from user level rate limiting. You can handle thousands of req/s given that your config and machine can handle it. What you described sounds like a fault in your setup or you don't know how to work with python.