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

logz: Swap from pformat to json.dumps when stringifying json response… #10189

Merged

Conversation

mingwandroid
Copy link
Contributor

…s for debug

@mingwandroid mingwandroid requested a review from a team as a code owner August 25, 2020 14:38
@cla-bot cla-bot bot added the cla-signed [bot] added once the contributor has signed the CLA label Aug 25, 2020
@mingwandroid mingwandroid force-pushed the speed-up-some-logz-json-debug branch 4 times, most recently from 2685c82 to 4f80c8f Compare August 25, 2020 14:44
When wishing to (debug) print 256 characters from repodata.json from conda-forge,
pprint() was observed to take 70 seconds. Changing this to json.dumps() gets it
to taking less than a second. Adding indent=2 brings that back up again to a
couple of seconds, so to counteract that, we make the assumption that every dict
item will result in at least one character being emitted. This seems reasonable
to me.
@mingwandroid mingwandroid merged commit 4cccb93 into conda:master Aug 26, 2020
@mingwandroid
Copy link
Contributor Author

Thanks @angloyna

@github-actions
Copy link

Hi there, thank you for your contribution to Conda!

This pull request has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue or pull request if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 27, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla-signed [bot] added once the contributor has signed the CLA locked [bot] locked due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants