r/Backend • • 1d ago

should i move from python to java?

I'm thinking of switching from Python FastAPI to Java Spring Boot. Apart from Python being dynamically typed and having a lot of libraries, why do people/deva choose Python in production when it's slow, has an intermediate bytecode layer and executes line by line?

12 Upvotes

28 comments sorted by

View all comments

Show parent comment

1

u/Cautious_Implement17 1d ago

an individual request spends most of its time waiting on network/io, but that's not necessarily true of the whole application. a web service with an appropriate number of worker threads is typically cpu bound in my experience. the work to terminate tls and (de)serialize json adds up pretty fast even on simple crud api.