0

I made the mistake of getting into the habit of autoloading a bunch of libraries, models..etc, when I don't need to. It is too hard to trace down all the cases to make sure everything is available and not broken. I am estimating the autoloading is causing 1-2 MB of extra resources per script. The total memory usage for my script is around 4Mb. (I used the profiler and disabled autoloading and saw that it dropped 1-2mb)

Is this something to worry about? The server I am running this on has 1gb of ram and doesn't ever seem to be under heady load.

Is this a bad thing? Am I worrying too much?

2
  • 3
    4MB? That's pretty awesome for most PHP apps. Commented Nov 13, 2013 at 21:30
  • hardware is cheap, wetware time is expensive. Commented Nov 13, 2013 at 21:38

1 Answer 1

2

Is always better to load what you needs.
But 4MB is a normal PHP app memory usage.
I read somewhere, in case of a php optimized app to worry when you exceed 9MB.

Memory usage become important when your server have to respond many requests. So the goal become to use less server ressource as possible to pay less.

Sorry for my poor english.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.