Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Better way for this

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 200
    Answer it

    I am creating an app in phonegap for daily news, I am storing my news details to amozon s3 server. So in my app home page i am displaying all news list. User can read news in both offline and online mode. I stored amozon s3 file link in my database. So for fetch the news detail i called the s3 file and get its details. When my app load i am fetching all news list and store it to my local database(sqllite). For getting all news details i am excuting all list in a loop(one by one) and hit a http request for fetch the every news details. The problem is that if i have 500 news list, then each time it iterate to 500 time and call the http request 500 time. That decrease my application proformence.(Some time http request failed and i am getting few news list details and then user can not able to read news in offile mode). Can You please tell me any better solution for thus

 1 Answer(s)

  • At the time of app load, when you are storing all file links in sqlite database, instead you can download those files at the App initialize and store those in a directory with directory name of current date, and instead of http url path you can store file path with corresponding directory in sqlite db.
    It will take time at loading of App at initial but later as your news are coming from local directory, it will speed up the performance also your problem of some file was not uploading at offline mode will be solved by this.

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: