BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-06-2005, 10:58 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2005
Model: 7100t
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question Best way to deal with large data

Please Login to Remove!

Hi,

I need to build a list from an xml file that is 700k online or 400k locally (if I edit out the unneccessary data). The list will be hierarchical, not one long list. The user will make some choices from the list the first time the program is run but not after that (usually).

I'm new to BB development (obviously) but not new to Java development. I'm fairly sensitive to the memory limitations imposed by the runtime enviroment (i.e. a handheld device). I'm also sensitive to the slow (compared to broadband) data rate.

Here's my question. Is it better to have the use wait initially for the 700k file to be downloaded and parsed, knowing it's a one-time operation, or is it preferable to include the data with the app? The latter method means the app will be carrying around a large chunk of data that may never be needed again.

After typing this I think I'm leaning toward the former method. However, I'd like to know what experienced developers think. Any inputs are welcomed.

Thanks,

Paul
Offline  
Old 08-07-2005, 07:22 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2004
Location: Metro NYC
Posts: 175
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

IMO, 700k is a really big download. If the data is static, I'd look to store the data in the app. But, probably not as XML. While good in many respects, XML is very bulky for wireless. We've done projects where converting from XML to CSV gave us a file 1/5th the size.

If possible, a better approach might be to download parts of the data as needed during the init. This is assuming you don't need the entire dataset.
__________________
-- Aric Rosenbaum
BlackBerry consulting, BlackBerry development
www.arconsultinginc.com
BlackBerry consulting and development (RIM SI Partner)
Offline  
Old 08-07-2005, 09:53 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2005
Model: 7100t
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks. The data is not under my control, though it is static...static enough anyway to put it in the app with little worry about frequent changes.

.cod files are compressed, right? So if I put the data with the app as text (csv) it would be compressed as well?

Regards,

Paul
Offline  
Old 08-07-2005, 12:37 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Aug 2005
Model: 7100t
Posts: 20
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by arconsulting
We've done projects where converting from XML to CSV gave us a file 1/5th the size.
Great tip. I imported what I needed from XML into Excel, saved it as a CSV and ended up with 77k. I think a 90% reduction isn't too bad

Thanks again!

Paul
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.