tommysiu / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

DateTypeHandler is slow #99

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?  If applicable, please provide a
mapping configuration and sample record input to recreate the problem.

I am parsing dates actively and DateTypeHandler takes a lot of CPU according to 
the profiler. It looks like it creates new DateFormat for each parse and it 
takes a lot of time.  

I've replaced it with simple format that reuses parser and it helps a lot.

What version of BeanIO are you using? What JDK version?

BeanIO 2.1.0.M2, jdk1.7.0_45

Original issue reported on code.google.com by tiv...@gmail.com on 9 Jan 2014 at 3:16

GoogleCodeExporter commented 8 years ago
Agreed.  I fixed this for number types in 2.0.1.M2 and plan to do the same for 
date types in the next release.

Original comment by kevin.s...@gmail.com on 11 Jan 2014 at 8:11

GoogleCodeExporter commented 8 years ago
Fixed for release 2.1.0.  Snapshot JAR attached.

Original comment by kevin.s...@gmail.com on 22 Jan 2014 at 3:46

Attachments:

GoogleCodeExporter commented 8 years ago

Original comment by kevin.s...@gmail.com on 7 Sep 2014 at 2:16