This repository was archived by the owner on Apr 29, 2019. It is now read-only.
Commit 92cbd4f
committed
Optimize ID to SKU lookup of tier prices.
Previously, with a large number of tier or group prices, each tier would separately
make a database query to lookup the associated SKU.
This instead load the ID to SKU mapping once, and uses it for all tiers.
When lookup up a batch of 100 SKUs with hundreds of tier prices per SKU, this cuts
lookup time from on the order of 4s to on the order of 0.1s or less.1 parent 1dcb55d commit 92cbd4f
File tree
1 file changed
+10
-8
lines changed- app/code/Magento/Catalog/Model/Product/Price
1 file changed
+10
-8
lines changedLines changed: 10 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
175 | 177 | | |
176 | | - | |
| 178 | + | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
| |||
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | | - | |
306 | 307 | | |
307 | | - | |
| 308 | + | |
308 | 309 | | |
309 | | - | |
| 310 | + | |
310 | 311 | | |
| 312 | + | |
311 | 313 | | |
312 | | - | |
313 | | - | |
| 314 | + | |
| 315 | + | |
314 | 316 | | |
315 | 317 | | |
316 | 318 | | |
317 | | - | |
| 319 | + | |
318 | 320 | | |
319 | 321 | | |
320 | 322 | | |
| |||
0 commit comments