Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/11090#issuecomment-180795225
I'm not arguing with the optimization, just moaning at the use of
`ThreadLocal`. This one at least isn't likely to cause a memory leak. Yes, I
understand that the more use, the better, which is why it'd be great to see if
we can do this once to optimize lots of call sites.
However now that I am back in front of the computer I don't see any. Most
are in test code. There are some silly calls to
`Calendar.getInstance().getTime()` but these won't hurt.
Yeah, `clear()` doesn't un-set the time zone right? Which is OK in this
method.
Is your 20 seconds improvement total wall-clock time difference over all
records -- as in saving 6 nanoseconds per record? although I like optimization
that sounds very small.
https://github.com/apache/spark/pull/11071 doesn't seem to be correct; is
that intended to be part of this change?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]