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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:06:46+00:00 2026-06-08T13:06:46+00:00

I have a app that loads some json from my php web service. This

  • 0

I have a app that loads some json from my php web service. This information may update every hour or so.

Currently every time a user hits the url i requery the database and present the json results.

I am now getting a few more users and want to minimise the load on the server.

Is it better to run this way or run a cron job and read and write from a file.

i.e The cron does the query and saves to a local file.
When the user hits the url i then read the query.

I have tested both and load time is about the same but i wonder how this effects the sever overall?

I don’t think memchace is any good due to the amount of data returned.

Any tips or ideas would be great

Dan

  • 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-08T13:06:48+00:00Added an answer on June 8, 2026 at 1:06 pm

    It is much better to create a plain text file that is fetched with your json data in it.

    The serverload is much higher if the webserver has to invoke a script (and possible queries too to the database). Many processes are involved in this, even though good webservers try to optimize as much as possible.

    A plain file is fetched without much overhead, so go for the cronjob to update the file, as let your app simply request that file, like you suggested yourself.

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

Sidebar

Related Questions

I have a rails app that loads lots of data from some java services.
I have a Grails app that loads its data from xml files and delivers
I made a web app that loads images using jquery, ajax and json. I
I have a Django app that needs to pull the follower_count information from several
I have an app that requests from the server some data on xml type.
I have a winforms app that loads some images and text and saves the
I have a C++ app that uses Python to load some scripts. It calls
I have an app that when I click a button loads a new TabItem
I have a Cordova app that runs the jQuery mobile framework and loads pages
I have a flash app that plays movies. It loads subtitles and subtitle times

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.