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 3963818
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:15:37+00:00 2026-05-20T03:15:37+00:00

Suppose I have a very long file, utilities.php, which contains most if not all

  • 0

Suppose I have a very long file, utilities.php, which contains most if not all functions used by the web application. Every single page loaded will include() this file, but utilize maybe just a handful of the functions in it.

Are there any significant downsides to doing things this way, performance wise? I could split the file into several based on the type of functionality provided, but strictly from performance perspective, is it bad to include everything into every page, but run only what is needed?

  • 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-05-20T03:15:38+00:00Added an answer on May 20, 2026 at 3:15 am

    To be honest, I’d be more concerned about the maintainability of your code than the size of the file. (If you think the code base will be easier to maintain if it’s broken into smaller files based on functionality, then it would be wise do this.)

    Irrespective, it’s largely irrelevant in the grand scheme of things, as the underlying operating system will most likely be caching such frequently used files in memory, etc.

    Additionally, being realistic, if the file becomes so large that it’s causing a performance issue, then you’re likely to have a much more pressing code maintenance (in terms of managing a file filed with so many functions) problem, at which point it would probably make sense to break the functions into related chunks in their own files.

    However, there’s most likely to be no need to do this anytime soon – and if you notice any slowdown in the future, I’d recommend using a profiling tool (such as Xdebug) to pinpoint the issue, rather than attempting to second-guess what the problem might be.

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

Sidebar

Related Questions

I have a python app which is supposed to be very long-lived, but sometimes
Suppose we have some resource(a file on disk) in which we have to write
I'm porting a program that had a very long loading time which was not
Suppose I have written a decorator that does something very generic. For example, it
I have a very large list Suppose I do that (yeah, I know the
I suppose most of the developers have an idea of multi-layer architecture. We have
I currently have a very simple web application written in Django, and I would
Suppose you have a dictionary that contains valid words. Given an input string with
Supose we have a very simple model: Station has at least one Train Train
I have a very simple bit of code that is supposed to capture the

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.