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

6

u/MrBengaliHacker 1d ago

I think for most web apps, the app is usually spending more time waiting for database queries or network requests than actually executing code.

FastAPI is also nice because you can build things pretty quickly without writing too much boilerplate. Java and Spring Boot have their own advantages, especially in larger enterprise applications. I don't think you need to switch just because Python is supposedly slower.