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

reduce unecessary memory allocation #49

Merged
merged 1 commit into from
Nov 18, 2014
Merged

reduce unecessary memory allocation #49

merged 1 commit into from
Nov 18, 2014

Conversation

karlseguin
Copy link
Contributor

Avoid calls to logQueryArgs when logger is a discardLogger

using the default discardLogger. This allocates quite a bit of memory.
Created a default dlogger instance and avoid logging code when that's our
logger. I couldn't think of a better implementation without touching the
Logger interface.

On 100 000 inserts, this brought the allocation down to 58MB from 122MB.
It should also result in some small performance gains.
@jackc
Copy link
Owner

jackc commented Nov 18, 2014

Good idea.

jackc added a commit that referenced this pull request Nov 18, 2014
reduce unecessary memory allocation
@jackc jackc merged commit 79818c2 into jackc:master Nov 18, 2014
jackc added a commit that referenced this pull request Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants