Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process only required attributes in api/rest/products/ #4517

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

sreichel
Copy link
Contributor

Description (*)

Using REST api like https://magento-lts.ddev.site/api/rest/products/ace000 loads all product attributes, even if they are not selected in admin REST attributes configuration. Urls are genenated, prices are loaded, ...

@sreichel sreichel added performance Performance related improvement labels Jan 31, 2025
@github-actions github-actions bot added the Component: Catalog Relates to Mage_Catalog label Jan 31, 2025
@sreichel
Copy link
Contributor Author

4517-3

before (blue = useless calls when no prices or urls are required)
4517-1

after
4517-2

@github-actions github-actions bot added the Component: Api2 Relates to Mage_Api2 label Jan 31, 2025
@sreichel sreichel changed the title Load only required attributes in api/rest/products/ Process only required attributes in api/rest/products/ Jan 31, 2025
@sreichel sreichel added this to the 20.13.0 milestone Feb 2, 2025
@sreichel sreichel requested a review from theroch February 6, 2025 23:28
Copy link
Contributor

@theroch theroch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some more php doc comments.
The actual code logic looks OK to me.

@sreichel sreichel closed this Feb 12, 2025
@Hanmac
Copy link
Contributor

Hanmac commented Feb 12, 2025

@sreichel why did this MR get closed?

@sreichel
Copy link
Contributor Author

Too lazy to add docblocks.

(i cant remember aany new method added, where someone requested docblock changes)

@Hanmac Hanmac reopened this Feb 12, 2025
Hanmac
Hanmac previously approved these changes Feb 12, 2025
kiatng
kiatng previously approved these changes Feb 14, 2025
@Hanmac Hanmac dismissed stale reviews from kiatng and themself via 37ed818 February 14, 2025 06:00
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Api2 Relates to Mage_Api2 Component: Catalog Relates to Mage_Catalog improvement performance Performance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants