Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Code paths, auto-loaders, database connections, config files, etc. All that has to happen over and over for each request.

Do you most of those need to happen at all, ever? In my mind, auto-loader is a sign that nobody knows what's being loaded (if they did, they would just require it). Requires should be full pathed (because have you seen what happens when you search the include path). Mysql_pconnect has been doing connection pooling for a long time, mysqli supports it too (so yes, you do need to connect sometimes), anyway, if you're loading a framwork, loading that probably takes longer than connecting to a mysql server in the same colo.



IMHO, developer time is more expensive than CPU time; I don't want or need to have to write out all of those requires. That's the job of the autoloader. And if I'm writing my code remotely well enough, each section only uses the things that it needs. Granted, there may be some things that each request get that they don't need with the autoloader. But I can optimize later. "Make it work, make it right, make it fast"


> IMHO, developer time is more expensive than CPU time; I don't want or need to have to write out all of those requires.

Every wasted millisecond on the server side matters. It impacts scalability, customer experience (and revenue) etc. You should take every easy win you can get there.

Not doing full includes is just ridiculously lazy. It doesn't take that long to write them out, and your IDE can help you out there. I bet you spend more time on social media during office hours than you'd ever save from not having to type out those import statements.


Except you still need autoloading configured for most libraries in the ecosystem to work, unless you want to manually chain absolutely huge quantities of requires.


> I don't want or need to have to write out all of those requires. That's the job of the autoloader.

Or the IDE. IntelliJ or ReSharper does that for me. And I like dealing with any naming conflicts right then and there, which those tools allow me to do.


> IMHO, developer time is more expensive than CPU time

I see that you've never worked on a project where the CPU time needed to handle the traffic with crappy code is much more expensive than developer time to write efficient software.


I have. And one of my first steps after starting to clean things up is to switch to composer and autoload; because then I can start ripping things out much more easily, and still make improvements to both code quality and performance.


Users' time is more important than developer time or CPU time.

Burning cpu and maybe i/o looking for code all over the place is going to make it really hard to make it fast later.


> In my mind, auto-loader is a sign that nobody knows what's being loaded

Or that, you know. There is an extremely powerful language feature and the developers are taking advantage of it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: