Skip to content

Commit 268418d

Browse files
committed
ACP2E-2166: Magento is slow for customers with large address books
- changed implementation use an interceptor - addressed CR comments
1 parent 11b497c commit 268418d

File tree

3 files changed

+3
-23
lines changed

3 files changed

+3
-23
lines changed

app/code/Magento/Checkout/Model/DefaultConfigProvider.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,7 @@ private function getCustomerData(): array
397397
if ($this->isCustomerLoggedIn()) {
398398
$customer = $this->getCustomer();
399399
$customerData = $customer->__toArray();
400-
$addressLimit = null;
401-
if ($this->scopeConfig->getValue('checkout/options/enable_address_search', ScopeInterface::SCOPE_STORE)) {
402-
$addressLimit = (int)$this->scopeConfig->getValue(
403-
'checkout/options/customer_address_limit',
404-
ScopeInterface::SCOPE_STORE
405-
);
406-
}
407-
$customerData['addresses'] = $this->customerAddressData->getAddressDataByCustomer($customer, $addressLimit);
400+
$customerData['addresses'] = $this->customerAddressData->getAddressDataByCustomer($customer);
408401
}
409402
return $customerData;
410403
}

app/code/Magento/Customer/Model/Address/CustomerAddressDataProvider.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
<?php
22
/**
3-
* Copyright 2023 Adobe
4-
* All Rights Reserved.
5-
*
6-
* ADOBE CONFIDENTIAL
7-
*
8-
* NOTICE: All information contained herein is, and remains
9-
* the property of Adobe and its suppliers, if any. The intellectual
10-
* and technical concepts contained herein are proprietary to Adobe
11-
* and its suppliers and are protected by all applicable intellectual
12-
* property laws, including trade secret and copyright laws.
13-
* Dissemination of this information or reproduction of this material
14-
* is strictly forbidden unless prior written permission is obtained
15-
* from Adobe.
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
165
*/
176
declare(strict_types=1);
187

app/code/Magento/Customer/Test/Unit/Model/Address/CustomerAddressDataProviderTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Copyright 2023 Adobe
44
* All Rights Reserved.
55
*
6-
* ADOBE CONFIDENTIAL
7-
*
86
* NOTICE: All information contained herein is, and remains
97
* the property of Adobe and its suppliers, if any. The intellectual
108
* and technical concepts contained herein are proprietary to Adobe

0 commit comments

Comments
 (0)