This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing Vcard2.1 parser in Java

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are trying to parse data received in vCard2.1 format and populate several value objects which are later written to relational database. The vCard data is received as a single long string and to fetch values of different fields we are performing a String#split() operation.
It is observed that lot of GC cycles happen during this time and we were wondering if instead of split(), we could use something else. Like Java's Scanner API.

Question:

1. Will replacing split() calls with Scanner APIs reduce the number of objects created on heap?
2. Can regex be an option worth considering here?

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic