Closed GoogleCodeExporter closed 9 years ago
Good catch. We chose to instead just synchronize the serialize and deserialize
methods. See r452
Original comment by inder123
on 25 Sep 2009 at 5:15
Original comment by inder123
on 25 Sep 2009 at 5:15
Note, the synchronization will fix the threading issues, but there is a
performance
cost of that versus thread local variables. In high performance/highly threaded
environments, using SimpleDateFormat has a cost. Because of the way it's
implemented, with regular expressions, when you're running a lot of threads
there is
definitely a potential for blocking that could be problematic. I don't have
any hard
and fast numbers at the moment, but it might be worth while to run some
profiling
with at least 16 threads to make sure there aren't any performance issues.
Original comment by mcinto...@gmail.com
on 28 Sep 2009 at 5:05
Yes, we thought about the performance issues regarding synchronization.
However, the synchronization is
specific to the default DateTypeAdapter so the impact will be if you have lots
of dates getting serialized at the
same time. That shouldn't be a problem in real world situations in my opinion.
If you have a situation where this
is a concern, please reopen the bug and provide details and we will take
another look.
Original comment by inder123
on 28 Sep 2009 at 3:11
Original issue reported on code.google.com by
mcinto...@gmail.com
on 25 Sep 2009 at 4:12