Repository navigation
Only format debug log arguments when a logger is set - #293
Closed
guillaume-sainthillier wants to merge 1 commit into
Closed
guillaume-sainthillier wants to merge 1 commit into
guillaume-sainthillier wants to merge 1 commit into
Conversation
VipsObject::get() and VipsOperation::callBase() ran var_export() for their debug log on every call, and Introspect cast itself to a string, even though debugLog() drops the message when no logger is set.
Member
|
Please do not use LLMs to generate code or PR descriptions when contributing to libvips: EvidenceThe GitHub audit log indicate that the contribution was made using Claude Code: user_agent GitHub CLI 2.100.0 Agent/claude-code_2-1-286_agentSee also: https://agentscan.tools/user/guillaume-sainthillier. |
Author
|
@kleisauke my bad sorry for that 👍 the changes are still relevant and would be happy to open another PR |
Member
|
I just opened PR #294 as alternative to this. Thanks for reporting! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VipsObject::get()andVipsOperation::callBase()callvar_export()to build their debug log arguments on every call, andIntrospectcasts itself to a string, even thoughUtils::debugLog()discards the message when no logger is set. These are now only built when a logger is configured.This makes calls ~3–5% faster on small images (26.5–27.1 µs → 25.7–25.8 µs per operation in a loop of
invert()/add()/flip()+get()on a 16x16 image, libvips 8.16). Tests pass (the streaming tests needzend.max_allowed_stack_size=-1, as on master).