Skip to content

Commit 9bbe9aa

Browse files
authored
Merge pull request #138 from magento-commerce/MCLOUD-13619
MCLOUD-13619 : Improve web api async performance
2 parents e4ea984 + 426cefc commit 9bbe9aa

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

patches.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@
298298
">=2.4.5 <2.4.5-p11": "MCLOUD-13240__Patch_for_CVE_2025_24434_improve_web_api_async__2.4.5.patch",
299299
">=2.4.6 <2.4.6-p9": "MCLOUD-13240__Patch_for_CVE_2025_24434_improve_web_api_async__2.4.6.patch",
300300
">=2.4.7 <2.4.7-p4": "MCLOUD-13240__Patch_for_CVE_2025_24434_improve_web_api_async__2.4.7.patch"
301+
},
302+
"Patch - Improve-web-api-async-performance": {
303+
">=2.4.4 <2.4.4-p13 || >=2.4.5 <2.4.5-p12 || >=2.4.6 <2.4.6-p10 || >=2.4.7 <2.4.7-p5 || 2.4.8": "MCLOUD-13619__Improve_web_api_async_performance__2.4.x.patch"
301304
}
302305
},
303306
"magento/module-paypal": {
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
diff --git a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
2+
index 93555559ac9a1..2f46685c6b117 100644
3+
--- a/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
4+
+++ b/vendor/magento/module-webapi-async/Controller/Rest/Asynchronous/InputParamsResolver.php
5+
@@ -70,6 +70,11 @@ class InputParamsResolver
6+
*/
7+
private $methodsMap;
8+
9+
+ /**
10+
+ * @var array
11+
+ */
12+
+ private array $inputData = [];
13+
+
14+
/**
15+
* Initialize dependencies.
16+
*
17+
@@ -156,8 +161,14 @@ public function resolve()
18+
*/
19+
public function getInputData()
20+
{
21+
+ if (!empty($this->inputData)) {
22+
+ return $this->inputData;
23+
+ }
24+
+
25+
if ($this->isBulk === false) {
26+
- return [$this->inputParamsResolver->getInputData()];
27+
+ $this->inputData = [$this->inputParamsResolver->getInputData()];
28+
+
29+
+ return $this->inputData;
30+
}
31+
$inputData = $this->request->getRequestData();
32+
33+
@@ -167,7 +178,7 @@ public function getInputData()
34+
$inputData = array_merge($requestBodyParams, $inputData);
35+
}
36+
37+
- return array_map(function ($singleEntityParams) {
38+
+ $this->inputData = array_map(function ($singleEntityParams) {
39+
if (is_array($singleEntityParams)) {
40+
$singleEntityParams = $this->filterInputData($singleEntityParams);
41+
$singleEntityParams = $this->paramsOverrider->override(
42+
@@ -178,6 +189,8 @@ public function getInputData()
43+
44+
return $singleEntityParams;
45+
}, $inputData);
46+
+
47+
+ return $this->inputData;
48+
}
49+
50+
/**

0 commit comments

Comments
 (0)