Skip to content

Disentangle ujson from _lib/src/datetime #19486

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

Closed
jbrockmendel opened this issue Feb 1, 2018 · 3 comments
Closed

Disentangle ujson from _lib/src/datetime #19486

jbrockmendel opened this issue Feb 1, 2018 · 3 comments
Labels
Clean IO JSON read_json, to_json, json_normalize

Comments

@jbrockmendel
Copy link
Member

There are some non-trivial simplifications (and perf improvements) in tslibs.np_datetime available if ujson can be made to not call pandas_datetimestruct methods directly. Is there a viable way to make the ujson code go through the tslibs cython instead of through src/datetime?

@jreback jreback added IO JSON read_json, to_json, json_normalize Clean labels Feb 1, 2018
@jreback jreback added this to the Next Major Release milestone Feb 1, 2018
@jbrockmendel
Copy link
Member Author

@chris-b1 any idea how to do a c-equivalent of:

with tm.set_timezone(“UTC”):

? If that can be done then I think I have a fix for this issue.

@WillAyd
Copy link
Member

WillAyd commented Jan 9, 2020

@jbrockmendel what's the upside of doing this? I think potentially possible if we use the public keyword:

http://docs.cython.org/en/latest/src/userguide/external_C_code.html#public-declarations

But not sure on what it buys us as we'd just be adding an extra layer in between JSON and the date time conversion routines

@jbrockmendel
Copy link
Member Author

IIRC the motivations were

  • if np_datetime only needed to handle use cases getting called from within tslibs, then most of the non-nano code could be ripped out. I think there were some other simplifcations i had in mind, but dont remember them ATM.
  • some hope that by eliminating the dependencies in setup.py we might speed up compilation and/or reduce the compiled size

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

No branches or pull requests

3 participants