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

Long delay loading 75 Mailchimp Stores #1091

Open
roberto-ebizmarts opened this issue Jan 14, 2021 · 1 comment
Open

Long delay loading 75 Mailchimp Stores #1091

roberto-ebizmarts opened this issue Jan 14, 2021 · 1 comment

Comments

@roberto-ebizmarts
Copy link
Contributor

Long delay loading 75 Mailchimp Stores

Long delay (almost a minute) loading 75 Mailchimp Stores

Issue Description

Preconditions

1. Magento CE 2.3.X
2. Mailchimp extension version: 102.3.41
3. Having at least 75 Mailchimp Stores created in Magento.

Steps to reproduce

Open Mailchimp => Mailchimp Stores

Actual and Expected result

Expected result:
Load 75 Mailchimp Stores in few seconds or a second's fraction

Actual result:
Load 75 Mailchimp Stores delays almost a minute (50 seconds)

Additional information

Currently the method which fills the collection of Mailchimp Stores is loadStores() from: loadStores()

@Garde85
Copy link

Garde85 commented Feb 1, 2021

I thought to a possible solution about this issue.

My idea consist to avoid to truncate mailchimp_stores table and refill it every time admin users browse mailchimp_stores grid. Instead of it, my solution could remove only stores that are changed from last time users browsed listing. In this way loadStores function will be more light because the calls to mailchimp service will be executed only for stores that are changed in the while.

To apply this logic I will introduce 2 new parameters into core_config table:

1- mailchimp/general/mailchimp_last_grid_visited

This config data has global (or defualt) scope. And It will updated every time that function loadStores will be called. In this way I know last time that mailchimp_store table has been reloaded.

2- mailchimp/general/mailchimp_last_config_save

This config data has website/store view scope, and every time admin users change mailchimp configuration from (Stores > Configuration > Mailchimp > Malchimp ) related to one website/store view, this config data is updated.

Now I have last time that mailchimp_store table has been reload and mailchimp/general/mailchimp_last_config_save that tell me, for every website/store view, when i saved mailchimp configuration. If I have this 2 parameters I can avoid to truncate all stores in mailchimp_store table and remove only stores where I found that

mailchimp/general/mailchimp_last_config_save > mailchimp/general/mailchimp_last_grid_visited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants