Skip to content

Commit

Permalink
filterx/expr-compound: don't format result of expression unless debug…
Browse files Browse the repository at this point in the history
… is enabled

This is a performance optimization that should eliminate filter_object_repr()
calls from the profile.

Signed-off-by: Balazs Scheidler <[email protected]>
  • Loading branch information
bazsi committed Dec 30, 2024
1 parent 7c7ef1f commit d6545c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/filterx/expr-compound.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ _eval_expr(FilterXExpr *expr, FilterXObject **result)

gboolean success = expr->ignore_falsy_result || filterx_object_truthy(res);

if ((!success || trace_flag) && !expr->suppress_from_trace)
if (((!success && debug_flag) || trace_flag) && !expr->suppress_from_trace)
{
ScratchBuffersMarker mark;
GString *buf = scratch_buffers_alloc_and_mark(&mark);
Expand Down

0 comments on commit d6545c1

Please sign in to comment.