## Performance Issues in `Magento_Downloadable` ### Findings | # | File | Line(s) | Issue | Consensus Severity | |---|------|---------|-------|--------------------| | 123 | `Block/Catalog/Product/Links.php` | 71-74, 79-82, 105 | **Missing Caching**: `getLinks()` called multiple times (in `hasLinks()` and `getJsonConfig()`) without memoization between calls. | **Medium-High** | | 124 | `Model/Product/Type.php` | 169-176 | **Full Collection Load**: `hasLinks()` calls `getLinks()` (full collection query) and wraps in `count()` for boolean check. | **Medium-High** | | 125 | `Model/Product/Type.php` | 239-242 | **Full Collection Load**: `hasSamples()` calls `getSamples()` (full collection query) and wraps in `count()` for boolean check. | **Medium-High** | ### Methodology - Static code analysis cross-validated by 3 AI systems (Claude, Codex gpt-5.4, Gemini 3 Pro)
Performance Issues in
Magento_DownloadableFindings
Block/Catalog/Product/Links.phpgetLinks()called multiple times (inhasLinks()andgetJsonConfig()) without memoization between calls.Model/Product/Type.phphasLinks()callsgetLinks()(full collection query) and wraps incount()for boolean check.Model/Product/Type.phphasSamples()callsgetSamples()(full collection query) and wraps incount()for boolean check.Methodology