Github user carsonwang commented on the pull request:
https://github.com/apache/spark/pull/11090#issuecomment-183801352
@srowen The 20 seconds improvements is the difference of the stage time.
i.e. before the patch, the stage runs 1.6 min. With this path it runs 1.2 min.
It takes about 1 second to create 1 million `Calendar` records. So it saves
about 1 microsecond per record.
Right, `clear()` doesn't un-set the time zone.
#11071 also wants to optimize the `stringToTimestamp` method. In my case,
the code doesn't call `stringToTimestamp`. I just noticed it also creates
`Calendar` and `TimeZone` objects which may have the similar issue. Anyway, we
can fix the issue in `stringToDate` first as this is more obvious?
---
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]