Skip to content

Commit

Permalink
Remove some too frequent profile scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Dec 11, 2024
1 parent 4e3e24a commit dbfbac6
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 11 deletions.
4 changes: 1 addition & 3 deletions crates/store/re_query/src/latest_at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ impl QueryCache {
entity_path: &EntityPath,
component_descrs: impl IntoIterator<Item = impl Into<Cow<'d, ComponentDescriptor>>>,
) -> LatestAtResults {
re_tracing::profile_function!(entity_path.to_string());
// This is called very frequently, don't put a profile scope here.

let store = self.store.read();

Expand Down Expand Up @@ -87,8 +87,6 @@ impl QueryCache {
// the data.
let mut max_clear_index = (TimeInt::MIN, RowId::ZERO);
{
re_tracing::profile_scope!("clears");

let potential_clears = self.might_require_clearing.read();

let mut clear_entity_path = entity_path.clone();
Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_view/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub fn latest_at_with_blueprint_resolved_data<'a>(
component_names: impl IntoIterator<Item = ComponentName>,
query_shadowed_defaults: bool,
) -> HybridLatestAtResults<'a> {
re_tracing::profile_function!(data_result.entity_path.to_string());
// This is called very frequently, don't put a profile scope here.

let mut component_set = component_names.into_iter().collect::<IntSet<_>>();

Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_view/src/results_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ pub enum HybridResults<'a> {

impl HybridResults<'_> {
pub fn query_result_hash(&self) -> Hash64 {
re_tracing::profile_function!();
// This is called very frequently, don't put a profile scope here.
// TODO(andreas): We should be able to do better than this and determine hashes for queries on the fly.

match self {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ fn transforms_at(
pinhole_image_plane_distance: impl Fn(&EntityPath) -> f32,
encountered_pinhole: &mut Option<EntityPath>,
) -> Result<TransformsAtEntity, UnreachableTransformReason> {
re_tracing::profile_function!();
// This is called very frequently, don't put a profile scope here.

let potential_transform_components =
TransformComponentTrackerStoreSubscriber::access(&entity_db.store_id(), |tracker| {
Expand Down
2 changes: 0 additions & 2 deletions crates/viewer/re_view_spatial/src/mesh_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ impl MeshCache {
mesh: AnyMesh<'_>,
render_ctx: &RenderContext,
) -> Option<Arc<LoadedMesh>> {
re_tracing::profile_function!();

self.0
.entry(key.versioned_instance_path_hash.row_id)
.or_default()
Expand Down
4 changes: 1 addition & 3 deletions crates/viewer/re_viewport_blueprint/src/view_contents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,6 @@ impl DataQueryPropertyResolver<'_> {

// Update visualizers from overrides.
if !node.data_result.visualizers.is_empty() {
re_tracing::profile_scope!("Update visualizers from overrides");

// If the user has overridden the visualizers, update which visualizers are used.
if let Some(viz_override) = blueprint
.latest_at_component::<VisualizerOverrides>(
Expand Down Expand Up @@ -524,7 +522,7 @@ impl DataQueryPropertyResolver<'_> {
query_result: &mut DataQueryResult,
view_states: &mut ViewStates,
) {
re_tracing::profile_function!();
// This is called very frequently, don't put a profile scope here.

if let Some(root) = query_result.tree.root_handle() {
let recursive_property_overrides = Default::default();
Expand Down

0 comments on commit dbfbac6

Please sign in to comment.