r/Python • • Jan 01 '20

"The rules of perf" at Dropbox

Post image
1.6k Upvotes

162 comments sorted by

View all comments

137

u/ZombieRandySavage Jan 02 '20

TL;DR. Really wish we hadn’t written the core application of our business in Python.

12

u/ukralibre Jan 02 '20

Why?

57

u/ZombieRandySavage Jan 02 '20

Because it scales poorly to large applications. Go try and refactor a suitably large project, it’s impossible.

Don’t worry there are terrible parts to every language. They didn’t have time to make a clever poster for C++ because they are still trying to understand the super clever template code someone wrote.

0

u/[deleted] Jan 02 '20

[deleted]

11

u/notsohipsterithink Jan 02 '20

Some languages naturally lend themselves to having large or convoluted codebases. Like C++ or Java.

11

u/jambox888 Jan 02 '20

Do you mean Java is better suited to large codebases or that it tends to produce them?

5

u/notsohipsterithink Jan 02 '20

Java tends to produce large codebases.

The lack of a proper module system (until Java 9 which very few have adopted) meant JAR clusterfuck and forced most codebases to become huge monoliths.

Production Python (or Go) codebases are usually microservices. But they can be monolithic easily too.

2

u/Smallpaul Jan 02 '20

I’ve never programmed Java seriously. What do you mean by it lacking a module system? Isn’t it similar to Python with dotted paths etc.?

1

u/notsohipsterithink Jan 02 '20

Project Jigsaw (introduced in Java 9) gives Java a module system similar to Python. More info here:

https://openjdk.java.net/projects/jigsaw/

From the overview, these are the advantages of modules over classpaths:

As described in the JSR, the specific goals of the module system are to provide:

— Reliable configuration, to replace the brittle, error-prone class-path mechanism with a means for program components to declare explicit dependences upon one another, along with

— Strong encapsulation, to allow a component to declare which of its public types are accessible to other components, and which are not.