Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 168
Registered: ‎11-01-2008
My Device: Galaxy S II
My Carrier: Meteor (Ireland)

Re: Copying database to Blackberry

 

@marchywka - I just wanted to pick up on your comment about how parsing XML is almost as slow as downloading it or words to that effect. I'm really surprised to hear that because our application is heavily XML-based and I haven't experienced that at all. That said, I have only ever run it on newer model Pearls, the Curve and the Bold, and on o/s 4.5+. Maybe it was a problem in the past...

 

One possible issue to watch out for though is that DOM is a poor choice when parsing a very large XML document - it has to build up an entire object tree in memory, and once GC kicks in you're in trouble. So for large documents it's best to use SAX parsing.

 

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Copying database to Blackberry

well, I would presume it is just a matter of numbers- sure, processors have gotten faster but as I keep pointing out why make things wasteful because you can get away with it now? If your files get bigger faster than processors get faster (LOL at sentence ) you still get slow for what benefit? It isn't more "flexible" or general if it encounters platform

limitations before naming and field usage problems due to a line oriented format.

 

Yeah, I kept pushing SAX earlier for a number of reasons if you must use XML. In this section of code, the DOM

was just easier to write. If you don't have to sort through extraneous junk in the XML( you generate it yourself)

or could live with the DOM as a datastructure I guess it would be ok for a final deployment. I'm pretty much sold

on arrays now so I can use the RIM indexing ( sort/binsearch ) eventually.

 

btw, on phones with file systems what options are there for random access?