The SQLite files will be larger than the XML and probably slower to access, on a one-off basis. If you insist on the 50 downloaded files, I'd place the data in a flat file of some sort, with a dope vector at the top to speed access. Compact and fast to access.
On Jul 24, 7:03 am, Capt Spaghetti <[email protected]> wrote: > Mark, > > It just occurred to me that your second option "have your smarter > server generate a SQLite database that you download periodically and > use locally on the device." might be just the approach I need. I could > generate 50 seperate SQLite files. The question then becomes how to > incorporate these locally and access? > > Thanks, > Gene > > On Jul 23, 3:12 pm, Mark Murphy <[email protected]> wrote: > > > I'd build a smarter server, one that returns just the data you need, > > via a GET request. Even if, for whatever reason, you cannot make your > > current server smarter, you can create a separate Web service (e.g., > > Google App Engine, Slicehost) that gets the data from the existing > > server, puts it in a database, and serves up what you need to the > > client. > > > Or, if the data does not change frequently, have your smarter server > > generate a SQLite database that you download periodically and use > > locally on the device. > > > Expecting a phone to be able to do bulk data parsing and processing > > quickly is unrealistic, even in today's Snapdragon-y world. > > > On Fri, Jul 23, 2010 at 3:05 PM, Capt Spaghetti <[email protected]> > > wrote: > > > I have 50 XML files located on a remote server, one formatted for > > > each state. I am able to read each of the 50 files by selecting a > > > state from a spinner and using a SAX parser but I cannot seem to find > > > out how to pull out information from each file by city. I have tried > > > unsuccessfully to pass a city variable to the characters method of the > > > Handler. > > > Each state has thousands of records and I am looking for a way to > > > speed up the search since reading the entire file for a state takes > > > several minutes. I used SAX since it was supposed to be the fastest > > > way to read but it limits me in selecting specific information. If I > > > understand things correctly I could use a DOM parser to find my state > > > and city specific data but that would make retrieval even slower. Any > > > suggestions would be appreciated. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > Android Development Wiki:http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

