- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Re-roll for 10.1.x, as I'm interested in testing this out for a migration which is having memory issues.
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
Re-roll of 91 to account for CR-3159012: Symfony Event class deprecated, EventDispatcher::dispatch() argument order changed β .
- π³πΏNew Zealand xurizaemon Εtepoti, Aotearoa π
And one more for coding standards.
- π«π·France andypost
All new properties need types and should use constructor promotion
-
+++ b/core/modules/migrate/src/MemoryManager.php @@ -0,0 +1,148 @@ + * @var float ... + protected $memoryReclaimThreshold; ... + * @var float ... + protected $memoryThreshold; ... + * @var int ... + protected $memoryLimit; ... + * @var \Symfony\Component\EventDispatcher\EventDispatcherInterface ... + protected $dispatcher;
needs to be typed and could be part of constructor
-
+++ b/core/modules/migrate/src/MemoryManager.php @@ -0,0 +1,148 @@ + * @param int|string $memory_limit ... + public function __construct(EventDispatcherInterface $dispatcher, $reclaim_threshold, $memory_threshold, $memory_limit = NULL) {
int|string|null
-
- π«π·France andypost
It's often less arguments passed, so no reason in deprecation and event dispatcher also could be created in constructor to minimize amount of useless extra function calls (will file follow-up)
Here's a fix for CS and fix test -
memory_usage
always int, never null - π«π·France andypost
To run tests the method is required, also fix one more place (test still fails)
- Merge request !5156Move memory management from MigrateExecutable to an event subscriber #3006750 β (Open) created by andypost
- Status changed to Needs review
over 1 year ago 3:34pm 27 October 2023 - Status changed to Needs work
over 1 year ago 10:58pm 31 October 2023 - πΊπΈUnited States smustgrave
There are some bullets in the remaining tasks that can't tell if they still apply. Could they be marked out if no longer applicable?
- Status changed to Needs review
3 months ago 1:02am 15 January 2025 - heddn Nicaragua
I've gone through and responded to most of the feedback mentioned in the IS. The requests in #80 & #82 are not super clear what is being asked given that the EnvironmentMemory object didn't materialize. Can we cross them off as well?
- πΊπΈUnited States moshe weitzman Boston, MA
The LRU cache finally landed in Drupal core (see related issues). It is likely that migrate can remove its memory handling as a result.
- π¬π§United Kingdom catch
Yes we might be able to delete this code altogether after π Use LRU Cache for static entity cache Postponed .
- πΊπΈUnited States smustgrave
Appears to need a rebase.
Wonder if the follow up tag is still needed?
If you are another contributor eager to jump in, please allow the previous poster at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
- π«π·France andypost
As the issue π Use LRU Cache for static entity cache Postponed is postponed it makes sense to file follow-up to clean-up and add TODO there, for #113
and needs rebase/reroll too