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

Use lightweight OC serializer when exchanges are not needed (make general settings page fast) #4482

Open
Tracked by #4610
luisramos0 opened this issue Nov 22, 2019 · 0 comments

Comments

@luisramos0
Copy link
Contributor

luisramos0 commented Nov 22, 2019

What we should change and why (this is tech debt)

The OC pages have been broken in 3 steps but the OC object we are loading is still the same in the 3 steps.
The general settings page doesnt need any of the data about the variants in the exchanges. This takes a long time to load if there are a lot of variants already selected in the OC.

The Api::Admin::OrderCycleSerializer should always include exchanges. But Api::Admin::ExchangeSerializer#variants doesnt need to include the variants all the time:

  • in the General Settings page no data about variants is needed, so we could have a simple Exchange serializer as part of the OC serializer for this page.
  • likewise, in the Incoming Settings page we dont need to load all variants of the outgoing exchanges
  • in the Outgoing Settings page, we need all variants in all exchanges. In the outgoing settings, we need variants in incoming exchanges only for the select all process, if we move the select all process to the server, variants of incoming exchanges are not needed in the outgoing settings page any more. This is related to the "extra note" in Move order_cycle_serializer#visible_variants_for_outgoing_exchanges to exchange_products_renderer#products_for_outgoing_exchange #4480

Context

This comes from breaking the OC page in 3 separate steps.

Impact and timeline

This will make the general settings page faster as it should be even if the OC contains thousands of variants.

@luisramos0 luisramos0 changed the title OC performance - use lightweight OC serializer when exchanges are not needed OC performance - use lightweight OC serializer when exchanges are not needed (make general settings page fast) Nov 22, 2019
@sigmundpetersen sigmundpetersen changed the title OC performance - use lightweight OC serializer when exchanges are not needed (make general settings page fast) Use lightweight OC serializer when exchanges are not needed (make general settings page fast) May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: All the things 💤
Development

No branches or pull requests

1 participant