-
-
Notifications
You must be signed in to change notification settings - Fork 245
Printing json is very slow #729
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
Comments
Thanks hcarl, this is some https://accidentallyquadratic.tumblr.com/ behavior in curtsies that just started being exercised. |
See #703 for more |
Interesting thanks - probably makes sense to close this one, then. Sorry for not detecting the other issue. |
I have reverted the change that caused this, if you upgrade to 0.17.1 you should be ok again :) |
Wonderful, looks great! Thanks a lot! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I just ran into the following hiccup: Printing json data can be VERY slow. It took about 45 seconds to print a json structure imported from a file about 1.2 Kbytes large (1239 bytes, to be precise). This is something that might deserve a warning, somehow?
Thanks a lot,
Holger
timeit.timeit('import json', number=3)
6.115995347499847e-06
timeit.timeit('import json; json.load(open("bla.json"))', number=3)
0.0003211210132576525
timeit.timeit('import json; print(json.load(open("bla.json")))', number=3)
{'metadata': {'kernelspec': {'language': 'c', 'name': 'c', 'display_name': 'C'}, 'language_info': {'file_extension': '.
c', 'name': 'c', 'mimetype': 'text/plain'}, 'celltoolbar': 'Create Assignment'}, 'nbformat_minor': 2, 'cells': [{'metad
ata': {'nbgrader': {'schema_version': 1, 'grade_id': 'cell-fbe773322fcd8530', 'grade': True, 'locked': False, 'points':
0, 'solution': True}}, 'cell_type': 'markdown', 'source': ['12345 2365 8899']}, {'metadata': {}, 'cell_type': 'markdow
n', 'source': ['# Test for a C -based assignment ']}, {'execution_count': None, 'metadata': {'nbgrader': {'schema_versi
on': 1, 'locked': False, 'grade_id': 'cell-472e432b19c0c2ae', 'grade': False, 'solution': True}}, 'source': ['#include
<stdio.h>\n', '\n', 'int main() {\n', ' // BEGIN SOLUTION\n', ' printf("hallo\n");\n', ' // END SOLUTION\n',
'}'], 'cell_type': 'code', 'outputs': []}, {'execution_count': None, 'metadata': {}, 'source': [], 'cell_type': 'code',
'outputs': []}], 'nbformat': 4}
{'metadata': {'kernelspec': {'language': 'c', 'name': 'c', 'display_name': 'C'}, 'language_info': {'file_extension': '.
c', 'name': 'c', 'mimetype': 'text/plain'}, 'celltoolbar': 'Create Assignment'}, 'nbformat_minor': 2, 'cells': [{'metad
ata': {'nbgrader': {'schema_version': 1, 'grade_id': 'cell-fbe773322fcd8530', 'grade': True, 'locked': False, 'points':
0, 'solution': True}}, 'cell_type': 'markdown', 'source': ['12345 2365 8899']}, {'metadata': {}, 'cell_type': 'markdow
n', 'source': ['# Test for a C -based assignment ']}, {'execution_count': None, 'metadata': {'nbgrader': {'schema_versi
on': 1, 'locked': False, 'grade_id': 'cell-472e432b19c0c2ae', 'grade': False, 'solution': True}}, 'source': ['#include
<stdio.h>\n', '\n', 'int main() {\n', ' // BEGIN SOLUTION\n', ' printf("hallo\n");\n', ' // END SOLUTION\n',
'}'], 'cell_type': 'code', 'outputs': []}, {'execution_count': None, 'metadata': {}, 'source': [], 'cell_type': 'code',
'outputs': []}], 'nbformat': 4}
{'metadata': {'kernelspec': {'language': 'c', 'name': 'c', 'display_name': 'C'}, 'language_info': {'file_extension': '.
c', 'name': 'c', 'mimetype': 'text/plain'}, 'celltoolbar': 'Create Assignment'}, 'nbformat_minor': 2, 'cells': [{'metad
ata': {'nbgrader': {'schema_version': 1, 'grade_id': 'cell-fbe773322fcd8530', 'grade': True, 'locked': False, 'points':
0, 'solution': True}}, 'cell_type': 'markdown', 'source': ['12345 2365 8899']}, {'metadata': {}, 'cell_type': 'markdow
n', 'source': ['# Test for a C -based assignment ']}, {'execution_count': None, 'metadata': {'nbgrader': {'schema_versi
on': 1, 'locked': False, 'grade_id': 'cell-472e432b19c0c2ae', 'grade': False, 'solution': True}}, 'source': ['#include
<stdio.h>\n', '\n', 'int main() {\n', ' // BEGIN SOLUTION\n', ' printf("hallo\n");\n', ' // END SOLUTION\n',
'}'], 'cell_type': 'code', 'outputs': []}, {'execution_count': None, 'metadata': {}, 'source': [], 'cell_type': 'code',
'outputs': []}], 'nbformat': 4}
47.67986440501409
The text was updated successfully, but these errors were encountered: