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

Remove the redundant costly transform check during categorization #1695

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Mar 23, 2023

As far as I can tell this check is redundant and the overhead adds up when we have a large number of transforms.

This shaves about 6ms off of all_possible_space_views in the raw_mesh example.

Before:
image

After:
image

Checklist

@jleibs jleibs marked this pull request as ready for review March 23, 2023 17:23
entity_path,
&LatestAtQuery::new(timeline, TimeInt::MAX),
)
.is_some()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is a query over all time anyways, this seems completley redundant with the below, faster, check of simply, "Does this entity path include a transform component"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@jleibs jleibs added the 📉 performance Optimization, memory use, etc label Mar 23, 2023
Base automatically changed from jleibs/zero_copy_mesh to main March 23, 2023 17:35
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks perfectly cromulent to me, but perhaps @Wumpf wanna have a look-see too

Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at some point this was there to ensure that cameras would be classified as 3d, but yeah I don't see how this makes sense anymore

Looks like this fell out of the confusing times of arrow transition
Upper check was added here 7cd1f33
and then lower check here as an "arrow only fix" (??) aa09fe4

@Wumpf Wumpf merged commit 1802c20 into main Mar 23, 2023
@Wumpf Wumpf deleted the jleibs/no_redundant_transform_check branch March 23, 2023 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📉 performance Optimization, memory use, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants