News for hackers. Stuff that matters.
Re:Taking PHP Seriously by toast0 on Thursday October 13, 2016 @06:28PM (#12704656)
> 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.

Re:Taking PHP Seriously by dpcx on Thursday October 13, 2016 @07:50PM (#12705162)
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"
Re:Taking PHP Seriously by Twirrim on Friday October 14, 2016 @12:41PM (#12709262)
> 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.

Re:Taking PHP Seriously by bpicolo on Saturday October 15, 2016 @01:40PM (#12714896)
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.
Re:Taking PHP Seriously by avisser on Friday October 14, 2016 @10:20AM (#12708227)
> 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.

Re:Taking PHP Seriously by cagataygurturk on Saturday October 15, 2016 @08:24AM (#12713725)
> 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.

Re:Taking PHP Seriously by dpcx on Tuesday October 18, 2016 @11:14AM (#12735242)
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.
Re:Taking PHP Seriously by toast0 on Thursday October 13, 2016 @09:19PM (#12705553)
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.

Re:Taking PHP Seriously by stephenr on Friday October 14, 2016 @09:40AM (#12707969)
> 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.