Skip to content

Conversation

@urmez
Copy link

@urmez urmez commented Jan 19, 2026

No description provided.

@google-cla
Copy link

google-cla bot commented Jan 19, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@urmez urmez changed the title Optimization to Skip this entire family - no instances will match Optimization to Skip this entire family Jan 19, 2026
@dmah42
Copy link
Member

dmah42 commented Jan 19, 2026

can you add tests please? and run the formatter.

// Check if the filter spec starts with the family name
// or if the family name appears as a substring in the spec
family_could_match = spec.find(family->name_) != std::string::npos ||
spec == "." ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

The . special case should probably be checked first.


// Optimization: Quick check if family name could match the filter
// before iterating through all args combinations
bool family_name_disabled = family->name_.rfind(kDisabledPrefix, 0) == 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why rfind() though, instead of find()?
That being said i think it might make sense to define a helper function string_has_prefix() for this...

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.

3 participants