Skip to content

algorithm: drop noisy thread_info(string) tracing from helpers - #23

Merged
transfix merged 1 commit into
masterfrom
cvc-singleton/algorithm-thread-info
May 2, 2026
Merged

transfix merged 1 commit into
masterfrom
cvc-singleton/algorithm-thread-info

Conversation

@transfix

@transfix transfix commented May 2, 2026

Copy link
Copy Markdown
Owner

Removes 25 call sites of the legacy thread_info(string) constructor from src/cvc/algorithm.cpp. Each was a per-call thread-info breadcrumb that delegated to app::instance(). They appeared in:

  • public entry points: iso, tetrahedralize, hexahedralize, tetrahedralize2 (×2), geometry::quality_improve, extract_surface, extract_quality_elements
  • pure-math helpers: tet_volume, tet_aspect_ratio, tet_min_dihedral_angle, hex_volume, hex_jacobian, hex_scaled_jacobian, tet_barycentric, hex_trilinear, interpolate_in_tet, interpolate_in_hex
  • mesh queries: find_tets_containing_point, find_hexs_containing_point, compute_mesh_bounds, compute_tet_quality_stats, compute_hex_quality_stats, filter_tets_by_quality, filter_hexs_by_quality

Their only side effect was mutating a per-thread status string visible via cvcapp's thread inspector. Removing them eliminates 25 of the remaining singleton callers without changing any public signature. Callers that want thread tracking can wrap the operation externally with thread_info(ctx, ...).

The (app&) ctor at app.h:373 is unchanged and remains the supported entry.

Build + ctest -j8 green: 590/590 (one StateTest.StateObjectRenderer flake passed on rerun, unrelated).

These 25 sites used the legacy thread_info(string) constructor that delegates
to app::instance(). They were per-call thread-info breadcrumbs in pure-math
and inner-loop helpers (tet_volume, tet_aspect_ratio, tet_min_dihedral_angle,
hex_volume/jacobian/scaled_jacobian, interpolate_in_tet/hex, tet_barycentric,
hex_trilinear, find_tets/hexs_containing_point, compute_mesh_bounds,
compute_tet/hex_quality_stats, filter_tets/hexs_by_quality,
extract_quality_elements, extract_surface) plus the public iso/tetrahedralize/
hexahedralize/quality_improve entry points. Their only side effect was
mutating a per-thread status string visible via cvcapp's thread inspector.

Removing them eliminates 25 callers of the singleton-delegating ctor without
changing any public API. Callers that want thread tracking can wrap the
operation externally with thread_info(ctx, ...).

The (app&) ctor at app.h:373 is unchanged and remains the supported entry.
Net: 25 fewer app::instance() call sites in libcvc.

Build + ctest (-j8) green: 590/590.
@transfix
transfix force-pushed the cvc-singleton/algorithm-thread-info branch from 58bc97f to ca98a5e Compare May 2, 2026 20:29
@transfix
transfix merged commit 9336c0a into master May 2, 2026
19 checks passed
@transfix
transfix deleted the cvc-singleton/algorithm-thread-info branch May 2, 2026 20:50
transfix added a commit that referenced this pull request May 2, 2026
These three legacy constructors silently delegated to app::instance() and
were the last in-libcvc consumers of the singleton outside of xmlrpc and
state.cpp (both deferred until cvcstate fold-in).

Removed:
- thread_info(const std::string&)
- thread_feedback(const std::string&)
- scoped_lock(const std::string&, const std::string&)

The (app&, ...) variants remain the supported API. One in-tree caller in
state_object.h::handleStateChanged() lambda was updated to pass _ctx
explicitly to thread_feedback.

Stacked on #23 (algorithm.cpp dropped its 25 1-arg thread_info calls).

Build + ctest -j8 green: 590/590 (one ThreadFeedbackExceptionSafety
flake passed on rerun).
transfix added a commit that referenced this pull request May 2, 2026
#25)

These three legacy constructors silently delegated to app::instance() and
were the last in-libcvc consumers of the singleton outside of xmlrpc and
state.cpp (both deferred until cvcstate fold-in).

Removed:
- thread_info(const std::string&)
- thread_feedback(const std::string&)
- scoped_lock(const std::string&, const std::string&)

The (app&, ...) variants remain the supported API. One in-tree caller in
state_object.h::handleStateChanged() lambda was updated to pass _ctx
explicitly to thread_feedback.

Stacked on #23 (algorithm.cpp dropped its 25 1-arg thread_info calls).

Build + ctest -j8 green: 590/590 (one ThreadFeedbackExceptionSafety
flake passed on rerun).
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.

1 participant