Splitting up large python module impact on performance?
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Jun 13 07:35:34 EDT 2018
On Wed, 13 Jun 2018 14:08:35 +1000, Cameron Simpson wrote:
> I was going to say something along these lines, but to some extent this
> feels like an unfair finger pointing exercise. Huge files can be a PITA;
> having something that aids moving around them reduces the pain, but
> doesn't remove the fact that sometimes something is too big.
Indeed.
As a simple practical matter, it is often simpler to navigate a large
code base when you can open separate files in separate windows or tabs,
rather than one giant file.
An editor which supports multiple independent views of the same file can
mitigate that somewhat, good tooling helps (but also only goes so far),
but as the Zen says
Namespaces are one honking great idea
Even if we could put the entire Python std lib in a single giant file
with half a million lines plus, we probably shouldn't.
--
Steven D'Aprano
"Ever since I learned about confirmation bias, I've been seeing
it everywhere." -- Jon Ronson
More information about the Python-list
mailing list