Improve performance of milestonish concern spec
What does this MR do?
Improves factory usage/performance of this spec.
Before
[TEST PROF INFO] Factories usage
Total: 1032
Total top-level: 970
Total time: 39.4554s
Total uniq factories: 11
total top-level total time time per call top-level time name
459 459 15.9509s 0.0348s 15.9509s issue
234 232 8.8066s 0.0376s 8.7426s user
111 111 0.8380s 0.0075s 0.8380s label
58 58 8.1986s 0.1414s 8.1986s project
56 0 2.1547s 0.0385s 0.0000s namespace
51 51 4.2354s 0.0830s 4.2354s merge_request
51 51 1.1116s 0.0218s 1.1116s milestone
4 0 0.0128s 0.0032s 0.0000s namespace_settings
4 4 0.1344s 0.0336s 0.1344s group
3 3 0.2245s 0.0748s 0.2245s labeled_merge_request
1 1 0.0195s 0.0195s 0.0195s license
After
Total: 50
Total top-level: 39
Total time: 3.5314s
Total uniq factories: 12
total top-level total time time per call top-level time name
9 9 0.3928s 0.0436s 0.3928s issue
9 9 1.6626s 0.1847s 1.6626s project
8 0 0.2683s 0.0335s 0.0000s namespace
6 5 0.3387s 0.0565s 0.3072s user
5 5 0.0834s 0.0167s 0.0834s label
3 3 0.4892s 0.1631s 0.4892s labeled_merge_request
2 0 0.0062s 0.0031s 0.0000s namespace_settings
2 2 0.0679s 0.0340s 0.0679s milestone
2 2 0.4067s 0.2034s 0.4067s merge_request
2 2 0.0701s 0.0350s 0.0701s group
1 1 0.0186s 0.0186s 0.0186s license
1 1 0.0328s 0.0328s 0.0328s admin
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because _____.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec -
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team