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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:23:43+00:00 2026-06-11T14:23:43+00:00

I am using onapp api in my website and in a page it is

  • 0

I am using onapp api in my website and in a page it is fetching all the servers in onapp. For some users this list is very large and it extends upto thousand in some cases. The response is not only data but it contains other information too. Also I am doing a pagination. So for each api has to be called and data should be populated. Now for increasing the speed of this I am writting the response to a file and reading from it. But it also taking time. Is there anyway to spped up this operation.

Before file caching, each page was taking around 45 seconds and now it is reduced to 25. But this is also a high value . I am using Symfony Framework. I am using the following code for caching data to file.

   $userStatisticsCached=unserialize(file_get_contents($filePath));
    if(is_null($userStatisticsCached)||$userStatisticsCached==false){
        $userStatistics = $statisticsInstance->getList(1);
        file_put_contents($filePath, serialize($userStatistics));
    }
    else {
        $userStatistics=$userStatisticsCached;
    }

Is there any better method for achieving the same output with less loading time ?

  • 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-11T14:23:44+00:00Added an answer on June 11, 2026 at 2:23 pm

    First: 45seconds is a lot to load a page. How many API calls are you making?

    Second: Whoa, 25seconds when having all API calls already cached in filesystem is absolutely huge, too. How many filesystem lookups does your page load perform? Are you sure all your API requests are cached when measuring the 25s page load?

    In-Memory Caching:
    Depending on the size of your data, I would certainly suggest storing your cached data in memory to speed up cache lookups. For caches around 1GB or less it shouldn’t be an issue (depending on what server hardware/hosting provider you are running on). An excellent first choice is Memcache, which also happens to have good PHP support.

    Running Memcache: When working locally on your computer you should have no problem installing memcached for yourself. When you upload your website to the server, you’ll either need to ensure that Memcache is running on the same server, or ask your server hosting provider for details on how to connect to their memcache server. Most PHP hosting providers offer Memcache as part of the hosting. If they don’t, you can use a hosted remote memcache provider like MemCachier, although again the latency to a remote server is going to slow down your cache lookups.

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

Sidebar

Related Questions

I have been using VBA to some degree, using this code: Sub ExtractEmail() Dim
Possible Duplicate: Converting XML to JSON using Python? I'm doing some work on App
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using the Redis info command, I am able to get all the stats of
i have created a single page application of showing phonebook data in a list.
I working on app what should get list of users from db and update
Note- even though im using phonegap, the question is not about some issue in
Any pointers, advice on implementing a REST API on App Engine with Python? Using
i have a strange problem with the fb mobile api. Im using the latest

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.