Problem/Motivation
We can switch from a provider to a foreach in the trait, this reduces the time taken by about 90%.
Steps to reproduce
Before:
From my local install:
Time: 00:58.153, Memory: 4.00 MB
OK (19 tests, 184 assertions)
Daily test run:
https://git.drupalcode.org/project/drupal/-/jobs/2502554
Drupal\Tests\update\Functional\UpdateSemverCoreSecurityCover 19 passes 161s
After:
Time: 00:13.074, Memory: 6.00 MB
OK (1 test, 94 assertions)
Pipeline run:
https://git.drupalcode.org/project/drupal/-/jobs/2513463
Drupal\Tests\update\Functional\UpdateSemverCoreSecurityCover 1 passes 15s
Proposed resolution
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | after_test_improve.png | 109.08 KB | pooja_sharma |
| #5 | before_test_improve.png | 113.25 KB | pooja_sharma |
Issue fork drupal-3469583
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
catchComment #4
catchComment #5
pooja_sharma commentedLeft minor feedback may be can be addressed, otherwise +1 changes looks good: used protected from public & removed the dataProvider() reference as well, verified test changes on local, its output on the basis of time & memory usage as follow:
Before applied MR changes test takes : Time:
01:40.590,Memory: 6.00 MBAfter applied MR changes test takes: Time:
00:17.520, Memory: 6.00 MBobserved test & its resources usage improved & attached screenshot as well.
Comment #6
pooja_sharma commentedComment #7
pooja_sharma commentedApplied minor suggestion apart from nothing seems to left. I tested again and it's a improve the performance.
My only code contribution was to update public to protected dataProvider() so I think it's ok for me to mark RTBC.
Comment #8
pooja_sharma commentedComment #11
nod_Committed and pushed 04fcdb4758 to 11.x and 77ae3bfce1 to 11.0.x and 45e03ba945 to 10.4.x and 986c71cc27 to 10.3.x. Thanks!