Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Date._strptime in Java to improve the performance #4591

Closed
muga opened this issue May 6, 2017 · 5 comments
Closed

Introduce Date._strptime in Java to improve the performance #4591

muga opened this issue May 6, 2017 · 5 comments
Milestone

Comments

@muga
Copy link
Contributor

@muga muga commented May 6, 2017

Overview

  • I want to improve the performance of Date._strptime method.
  • I'm implementing Date._strptime in Java on embulk/embulk#608
  • Can you consider about introducing our implementation to JRuby? If you agree, I will work on it after completing the implementation.

Details

My application, Embulk, is using JRuby and heavily using Date._strptime method internally to parse timestamp strings. I found that the heavy usage is one of the performance bottlenecks in my application.
To mitigate the performance issue, I started implementing Date._strptime in Java. The features are:

  • 100% compatibility with the specification of Date._strptime in CRuby
  • Faster performance because the # of objects passing is reduced between Java and (J)Ruby
  • The implementation uses similar approach with org.jruby.util.RubyDateFormatter and org.jruby.lexer.StrftimeLexer.

Environment

  • JRuby 9.1.5.0
  • Java 1.8.0_91 64-Bit Server VM (build 25.91-b14, mixed mode)
  • Ubuntu 16.04
@headius
Copy link
Member

@headius headius commented May 6, 2017

@muga We'd love to incorporate your implementation! Provide a PR and let us know you consent to it being in JRuby under our tri-license (GPL 2, LGPL 2, EPL). Thank you!

@muga
Copy link
Contributor Author

@muga muga commented May 6, 2017

@headius Thank you for letting me know. I complete the implementation and then create new PR.

@kares
Copy link
Member

@kares kares commented May 24, 2017

related #3640 (includes some numbers) ... @muga JRuby 9.2 would be perfect timing for delivery :)

@kares kares added this to the JRuby 9.2.0.0 milestone May 24, 2017
@muga
Copy link
Contributor Author

@muga muga commented May 24, 2017

@kares We started reviewing the implementation on our application github repo embulk/embulk#611. I'll do my best :)

@muga
Copy link
Contributor Author

@muga muga commented Jun 17, 2017

I'm closing this ticket because #4635 was merged into master.

@muga muga closed this Jun 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.