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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:46:04+00:00 2026-05-11T21:46:04+00:00

I have a question and I am very open to suggestions (even very odd

  • 0

I have a question and I am very open to suggestions (even very odd ones!)

I am writing an iPhone app, which does a request (URL with parameters) to a server. As a response, the iPhone receives XML. All is well.

Right now, I am looking to improve my application’s speed by measuring the time it takes to perform certain tasks. I’ve found that, of all the tasks performed (downloading, XML Parsing, sending the request, handeling the request, parsing objects from XML), downloading the actual XML takes the longest.

Now, my XML files are very, very, very easy and very, very, very small. I use them primarily to read RSS-like data and show them in a UITableView.

My app works very well, and there is nothing that feels really slow, but there is one application in the App Store right now which does something very similar to my application, but is way faster and feels more ‘snappy’, if you know what I mean. It also has the great feature to load the headlines one by one from the RSS-feed.

Currently I’m experimenting with gzip compression of my data, but the compression only makes my data half the size and it doesn’t seem to do any real good for performance. The main thing is, that the data has to be downloaded, before it gets parsed. It would be very cool to have a ‘stream’ of data, which is parsed as it comes in. That way, I can do two jobs almost simultaneous and load headlines one by one (making user interactivity more attractive).

Anyone has an idea of how to improve my performance? Either by great compression tips or entirely different ways to communicate with the server.. All is welcome!

UPDATE: putting the latency and responsiveness of the server aside; how could I get a source of XML to be ‘streamed’ to my iPhone (downloaded byte for byte) and at the same time get parsed? Right now it is a linear process of downloading -> parsing -> showing, but it could become semi-parallel by downloading & parsing at the same time (and show each item when it is done downloading, instead of loading it all at the same time in a UITableView)

  • 1 1 Answer
  • 3 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-11T21:46:04+00:00Added an answer on May 11, 2026 at 9:46 pm

    Assuming you’re using NSXMLParser’s initWithContentsOfURL:, that’s probably part of the problem. It seems like that downloads the entire contents of the URL, then hands it off to the parser to parse all at once.

    Despite the fact that the NSXMLParser is an event-driven parser, it doesn’t seem to support streaming data to the parser in an incremental manner. You could, of course, replace NSXMLParser with some other parsing library that handles incremental data in a more sensible way.

    An alternative would be to use NSURLConnection, and create a new NSXMLParser and re-parse the data each time some data comes in, in the connection:didReceiveData: method of your NSURLConnection’s delegate. You”d have to write some extra code to ignore the extra events from re-parsing the beginning of the file more than once.

    This seems like it’d be more work than just grabbing some other library and adapting it, but maybe not, depending on how you’re handling the downstream creation of your table data.

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

Sidebar

Related Questions

I have a very simple Office utility question. Open Microsoft word (2003 or 2007),
I have two question to put forward: I was very interested, even intrigued by
This is a very open question about a problem that we have. Basically, we
Okay this question is very simple: I have a facebook page, and a website.
I have a question about DFA minimization. So I've used very well known techniques
Great site! I have a question I haven't seen answered. I am very new
I have a very simple question, How can I get the POST values from
i have a very conceptual question regarding jquery. i have this fiddle http://jsfiddle.net/zvCrN/ What
I have a very simple question. In FB tutorial https://developers.facebook.com/docs/mobile/ios/build/ it starts to login
I have a very simple question. Trying to figure out what is the simplest

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.