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

  • SEARCH
  • Home
  • 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 8251995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:25:12+00:00 2026-06-08T00:25:12+00:00

I just started using xdebug to profile my application and immediately noticed something strange

  • 0

I just started using xdebug to profile my application and immediately noticed something strange in the results. One of the require_once functions is shown to be taking around 12% of the processing time. There are quite a few other calls to require_once throughout the application and they’re all taking less than 1% of the processing time.

The poorly-performing require_once is including a file that’s not significantly different or larger than any of the other files, so I’m not sure what could be causing the problem. Has anybody else ever experienced something like this?

Edit: Wanted to provide a little more info. I’m doing the profiling on windows using XAMPP. Normally the application runs on a unix box. I haven’t got an easy way to get xdebug onto the box, so it may not be feasible for me to try and compare the results that way.

One last edit: Here’s an idea of the code in case that helps (intentionally being vague for the standard CYA legal reasons blah blah blah):

This class is the one with the slow include (test.inc):

require_once('/xx/yy/zz/dao/basedao.inc');
require_once('/xx/yy/zz/vo/test.inc');

class TestDAO extends BaseDAO {
  // bunch of code to handle database records and return VO objects

And this is the file being included:

require_once('/xx/yy/zz/vo/basevo.inc');

class Test extends BaseVO {
  // bunch of properties, getters/setters, that kinda stuff

I have quite a few other VO/DAO objects that are built the exact same way, without any issue. All are located within the same respective paths.

  • 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. Editorial Team
    Editorial Team
    2026-06-08T00:25:14+00:00Added an answer on June 8, 2026 at 12:25 am

    That does indeed sound odd. Definitely worth pursuing, though it’ll be hard to work it out for sure without seeing the actual code. 12% of the total program time for a single require_once() does sound very excessive.

    But here are some thoughts on possible avenues of investigation:

    1. require_once() keeps a lookup table of files that have been included, so perhaps it’s slowing things down having to refer to that lookup table.
      If this is the cause, you could solve it by using require() rather than require_once() wherever possible.

    2. Perhaps it’s the path lookup? Are you including a path with the filename? If not, it’ll be checking in a number of places to find the file; perhaps it isn’t in the first place it looks, it’ll be taking longer to find the file before it can include it.
      If this is the cause, you could solve it by being more specific about the path in your code.

    Hope that helps. Would be interested to hear how this pans out.

    Oh, and by the way — if your biggest problem area in your code is require_once(), then it sounds like you’ve done a good job with your code! I dream of the day require_once() even shows up in my profiler reports, let alone with an significant effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started using this technique and am having strange results on the PC side.
just started using log4j in one of my home-projects and I was just about
Just started using CodeIgniter, loving it. Having enabled the database to be one of
I just started using Solrnet in my application only to discover that using the
I just started using Caliburn.Micro and I've noticed in all the examples that the
Just started using carrierwave with Rails and things have been going smoothly with one
Have just started using Google Chrome , and noticed in parts of our site,
We just started using StyleCop and the one thing I'm having a hard time
I just started using Ext JS to build a relatively complex web application for
just started using JPA today, so i'm preety new to it. How would one

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.