Skip to content

Conversation

@wmak
Copy link
Member

@wmak wmak commented Sep 15, 2021

  • This adds the ability to skip the entity handler entirely when calling
    features.has
  • This is becaue when there are a lot of non entity features to check
    we're actually spending time checking that the feature is indeed not
    an entity feature

Preview

Before

image

After

image

- This adds the ability to skip the entity handler entirely when calling
  features.has
- This is becaue when there are a lot of non entity features to check
  we're actually spending time checking that the feature is indeed not
  an entity feature
# Remaining features should not be checked via the entity handler
for feature_name in org_features:
if features.has(feature_name, obj, actor=user):
if features.has(feature_name, obj, skip_entity=True, actor=user):
Copy link
Member

Choose a reason for hiding this comment

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

nit: keep the order as the definition so features.has(features_name, obj, actor=user, skip_entity=True)

@wmak wmak enabled auto-merge (squash) September 23, 2021 15:32
@wmak wmak merged commit 5fac5ca into master Sep 23, 2021
@wmak wmak deleted the wmak/fix/skip-entity-handler branch September 23, 2021 15:32
vuluongj20 pushed a commit that referenced this pull request Sep 30, 2021
* fix(features): Skip the entity handler after batch checking

- This adds the ability to skip the entity handler entirely when calling
  features.has
- This is becaue when there are a lot of non entity features to check
  we're actually spending time checking that the feature is indeed not
  an entity feature
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants