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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:50:01+00:00 2026-05-27T23:50:01+00:00

I am writing a Sencha Touch app where user will download 5000 records in

  • 0

I am writing a Sencha Touch app where user will download 5000 records in JSON format and it will populte Ext.List control with them. The app downloads records fine because I am just using JSON.parse(…) and then add this data to the list using local storage store.

When I try to view the list, the app crashes and on chrome it lags a lot. I thought may be there is something I am messing up with the code but when I tried a test on iOS safari with this fiddle http://jsfiddle.net/Z8GVm/1/, it is throwing Safari unresponsive. Ain’t I supposed to hold that much data in iOS safari with JavaScript? If this is true, I got a argument that web is still not mature for assuming it can do everything native app can do.

Try on chrome http://senchafiddle.com/#gxtZ9
Try on iOS safari http://jsfiddle.net/Z8GVm/1/

  • 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-27T23:50:02+00:00Added an answer on May 27, 2026 at 11:50 pm

    That’s likely too much data to process in a row without letting the browser have any cycles and the mobile browser thinks that the javascript has gone unresponsive. It even takes several seconds to process on my quad-core desktop.

    You can break it into chunks and give the browser a breath (with a setTimeout) between each chunk like this. Demo here: http://jsfiddle.net/jfriend00/XFgAa/. Note, this is multiple times faster than your prior version that uses document.write() on every line because this accumulates an object’s worth of data and adds it all at once in one DOM operation so this new version has 1/27th the number of DOM operations.

    function addBigData() {
        // populate big array
        var items = [], i;
        for (i = 0; i < 5000; i++) {
            var data = {};
            for (var j = 1; j <= 8; j++) {
                data["prop" + j] = "Some Big Data " + j;
            }
    
            var item = {};
            item.data = data;
    
            items.push(item);
        }
    
        i = 0;
        function addNextChunk() {
            var chunkEnd = Math.min(i + 20, items.length);
            var chunk = [], item;
            while (i < chunkEnd) {
                item = items[i++];
                chunk.push("Item " + i);
                chunk.push("<br />");
                for (var prop in item.data) {
                    chunk.push("&nbsp;&nbsp;&nbsp;");
                    chunk.push(prop + " = " + item.data[prop]);
                    chunk.push("<br />");
                }
    
                chunk.push("<br /><br />");
            }
            var div = document.createElement("div");
            div.innerHTML = chunk.join("");
            document.body.appendChild(div);
            if (i < items.length) {
                setTimeout(addNextChunk, 1);
            }
        }
    
        addNextChunk();
    }
    
    addBigData();
    

    FYI, in a mobile browser you will hit some limits with available memory or local storage much sooner than you do with a desktop browser so you really shouldn’t be putting giant amounts of data into a page or even into local storage.

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

Sidebar

Related Questions

Im writing a Sencha touch app that I want to show a popup box
I'm writing a Sencha Touch 1.1 MVC app. My view code looks like this
I am writing an application using Sencha Touch that will require a login to
I'm writing an iPad app using Sencha Touch 2 and I need my app
I am writing a Sencha Touch app. I have a FormPanel which sends a
I am writing a native iPhone and Android app using Sencha Touch inside Phonegap
Hi im writing this android app using sencha touch. How do i store data
Writing an app that will include the ability to decompress zip and rar files.
I am writing an application with Sencha Touch. So I read a XML file
Writing an iPhone app in which I want to save the user the grief

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.