Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 43267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:28:06+00:00 2026-05-10T15:28:06+00:00

For our online game, we have written tons of PHP classes and functions grouped

  • 0

For our online game, we have written tons of PHP classes and functions grouped by theme in files and then folders. In the end, we have now all our backend code (logic & DB access layers) in a set of files that we call libs and we include our libs in our GUI (web pages, presentation layer) using include_once(‘pathtolib/file.inc’).

The problem is that we have been lazy with inclusions and most include statements are made inside our libs file resulting that from each webpage, each time we include any libs file, we actually load the entire libs, file by file.

This has a significant impact on the performance. Therefore What would be the best solution ?

  • Remove all include statements from the libs file and only call the necessary one from the web pages ?
  • Do something else ?

Server uses a classic LAMP stack (PHP5).

EDIT: We have a mix of simple functions (legacy reason and the majority of the code) and classes. So autoload will not be enough.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T15:28:07+00:00Added an answer on May 10, 2026 at 3:28 pm
    • Manage all includes manually, only where needed
    • Set your include_path to only where it has to be, the default is something like .:/usr/lib/pear/:/usr/lib/php, point it only at where it has to be, php.net/set_include_path
    • Don’t use autoload, it’s slow and makes APC and equivalent caches jobs a lot harder
    • You can turn off the ‘stat’-operation in APC, but then you have to clear the cache manually every time you update the files
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 81k
  • Answers 81k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think this thread answers your question: http://social.msdn.microsoft.com/forums/en-US/vstsarch/thread/07b39757-eac4-49fa-81d5-8d167c9b9d21/ As mentioned… May 11, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer Found it by using Reflector: string href = Url.Action("DetailsAsXml", new… May 11, 2026 at 4:31 pm
  • Editorial Team
    Editorial Team added an answer Have a look at: JotBug (from 2009): http://www.ohloh.net/p/jotbug (zip file… May 11, 2026 at 4:31 pm

Related Questions

I'm taskd with developing a packing algorithm for parts bought from our online store.
If you're familiar with the phrase build one to throw away, well, we seem
I have a webpp which works fine when under a light load. However, when
I've noticed a lot of talk about asp.net MVC lately, but I haven't come

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.