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

Issue fork drupal-3469583

Command icon 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

catch created an issue. See original summary.

catch’s picture

Issue summary: View changes
catch’s picture

Issue summary: View changes
pooja_sharma’s picture

StatusFileSize
new113.25 KB
new109.08 KB

Left 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 MB

After applied MR changes test takes: Time: 00:17.520, Memory: 6.00 MB

observed test & its resources usage improved & attached screenshot as well.

pooja_sharma’s picture

Status: Needs review » Needs work
pooja_sharma’s picture

Status: Needs work » Needs review

Applied 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.

pooja_sharma’s picture

Status: Needs review » Reviewed & tested by the community

  • nod_ committed 986c71cc on 10.3.x
    Issue #3469583 by catch, pooja_sharma: Speed up...
nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

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!

  • nod_ committed 45e03ba9 on 10.4.x
    Issue #3469583 by catch, pooja_sharma: Speed up...

  • nod_ committed 77ae3bfc on 11.0.x
    Issue #3469583 by catch, pooja_sharma: Speed up...

  • nod_ committed 04fcdb47 on 11.x
    Issue #3469583 by catch, pooja_sharma: Speed up...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.