• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Implementing Vcard2.1 parser in Java

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic