Commit 5b4aeee
committed
Move expensive
The `SatisfiesAttributeFilters()` call should be reasonably fast, but it's expensive compared to the other validation checks in the `PopulateTargetCollectionAsync()` loop, and there's no need to call it if we can easily reject adding a topic because it violates the `ContentTypeFilter`, is a `List`, or `IsDisabled`.
In practice, the most significant impact we'd expect here would be if `[FilterByAttribute()]` is combined with `[FilterByContentType()]`. These used to be the same filter, but since the content type was moved out of attributes, a new filter attribute needed to be introduced. There's no sense in evaluating the attributes if the content type isn't valid.SatisfiesAttributeFilters() call to end of loop1 parent e93d1f6 commit 5b4aeee
1 file changed
Lines changed: 11 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
925 | | - | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
926 | 932 | | |
927 | 933 | | |
928 | 934 | | |
| 935 | + | |
929 | 936 | | |
930 | 937 | | |
931 | 938 | | |
932 | 939 | | |
933 | 940 | | |
934 | 941 | | |
935 | 942 | | |
936 | | - | |
937 | | - | |
938 | | - | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
| 943 | + | |
| 944 | + | |
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| |||
0 commit comments