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

Improve speed of on-disk json key access #6

Open
chrisjsewell opened this issue Jun 2, 2017 · 0 comments
Open

Improve speed of on-disk json key access #6

chrisjsewell opened this issue Jun 2, 2017 · 0 comments

Comments

@chrisjsewell
Copy link
Owner

json_keys: ijson.parse is really slow, maybe do partial in_memory, using ijson.items
or, if implment json lazy loader ( #4 ), use that

     %timeit json_to_dict('test.json',['initial','crystallographic'], in_memory=True)
     100 loops, best of 3: 5.1 ms per loop
     %timeit json_to_dict('test.json',['initial','crystallographic'], in_memory=False)
     100 loops, best of 3: 4.78 ms per loop
     %timeit json_keys('test.json',['initial','crystallographic'], in_memory=True)
     100 loops, best of 3: 10.7 ms per loop
     %timeit json_keys('test.json',['initial','crystallographic'], in_memory=False)
     1 loop, best of 3: 697 ms per loop
@chrisjsewell chrisjsewell changed the title Improve speed of in_memory json key access Improve speed of on-disk json key access Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant