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

perf: Optimize get_attribute_filters #26729

Merged

Conversation

netchampfaris
Copy link
Contributor

@netchampfaris netchampfaris commented Jul 29, 2021

get_attribute_fitlers did stupid computations just to fetch a list of attribute values. A simple query is faster. Tested on real site with lots of items.

Before

image

After

image

Paired with @ankush and @shadrak98

@marination Please make sure to get this in E-commerce refactor.

@stale stale bot added the inactive label Aug 26, 2021
@ankush ankush added the hotfix label Aug 26, 2021
@stale stale bot removed the inactive label Aug 26, 2021
@frappe frappe deleted a comment from stale bot Aug 26, 2021
@ankush ankush force-pushed the optimize-get-attribute-filters branch from 91c647c to c52b696 Compare August 30, 2021 14:14
@coveralls
Copy link

coveralls commented Aug 31, 2021

Coverage Status

Coverage decreased (-0.008%) to 51.658% when pulling e9e3b1c on netchampfaris:optimize-get-attribute-filters into 5596988 on frappe:develop.

@nabinhait nabinhait merged commit 1c1b476 into frappe:develop Sep 14, 2021
frappe-pr-bot pushed a commit to frappe-pr-bot/erpnext that referenced this pull request Sep 14, 2021
* perf: Optimize get_attribute_filters

* fix: handle when filter attributes are undefined

* chore: unused imports

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
(cherry picked from commit 1c1b476)

# Conflicts:
#	erpnext/shopping_cart/filters.py
#	erpnext/www/all-products/index.html
@marination marination added e-commerce-fix E-commerce PRs that need to be front ported to develop manual-porting-required labels Sep 14, 2021
marination pushed a commit to marination/erpnext that referenced this pull request Oct 12, 2021
* perf: Optimize get_attribute_filters

* fix: handle when filter attributes are undefined

* chore: unused imports

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
@marination marination removed backport version-13-hotfix manual-porting-required e-commerce-fix E-commerce PRs that need to be front ported to develop labels Oct 12, 2021
marination added a commit that referenced this pull request Oct 27, 2021
…ers-hotfix

perf: Optimize get_attribute_filters (#26729)
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
* perf: Optimize get_attribute_filters

* fix: handle when filter attributes are undefined

* chore: unused imports

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
* perf: Optimize get_attribute_filters

* fix: handle when filter attributes are undefined

* chore: unused imports

Co-authored-by: Ankush Menat <ankush@iwebnotes.com>
asoral pushed a commit to asoral/erpnext that referenced this pull request Nov 12, 2021
…e-filters-hotfix

perf: Optimize get_attribute_filters (frappe#26729)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants