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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:17:37+00:00 2026-05-18T05:17:37+00:00

So I have 0.5MB XML file with data for my iPhone application. It’s all

  • 0

So I have 0.5MB XML file with data for my iPhone application. It’s all read-only so I don’t have to bother with writing.

Currently I’m using NSXMLParser to load data.

I had fun with NSXMLParser and I created a class that loads only the part of data that I currently need. So once the file is parsed it takes minimum of memory.

But it’s very slow. It takes 500-1000ms to parse the XML file and find the part of data that I need on my iPad.

I could load all the data at once and than just use it. That would definitely save me from all the XML loading and parsing, but then I would have 500kB NSArray or something. I don’t particularly like that idea.

I was wondering if there’s any way to do this that wouldn’t take much memory and would be fast too.

Any ideas please?

Updates:

Thanks everyone for answers. So it looks like these two options are the best for this case:

  1. Archiving XML data into binary form. It will be processed very quickly, and 500kB is really not that much to stay in the memory.
  2. If I really wanted to make it super-memory-efficient, than there’s SQLite or Core Data.

I think I’m gonna try and implement number one.

  • 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-18T05:17:38+00:00Added an answer on May 18, 2026 at 5:17 am

    500 KB really is not that much. To put it in perspective, loading a full screen image as a background on your iPad uses 2.9 MB.

    So, personally I would just load all data in memory and operate it directly.

    I would also convert from XML to an archived NSArray or NSDictionary. That should make the initial loading very very fast.

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

Sidebar

Related Questions

I have a 60mb XML file that has a list of products, approx 8k
I am writing a script in php4 that downloads a xml file that has
We have 5mb of typical text (just plain words). We have 1000 words/phrases to
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
Have a n-tire web application and search often times out after 30 secs. How
Rolling comments inside a log4net file. Is it possible to roll the data inside
I have small application that is uploading pictures to another website via webservice. My
Is there any other place besides the metabase.xml file where the file upload size
I have to parse large XML files in php, one of them is 6.5
I've looked carefully at leaks and I have none (very few - all under

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.