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: reduce DB calls made in get_fetch_values
#17671
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sagarvora
force-pushed
the
perf-get-fetch-values
branch
from
July 29, 2022 08:42
bf9b71d
to
f1b1ebc
Compare
sagarvora
force-pushed
the
perf-get-fetch-values
branch
2 times, most recently
from
July 30, 2022 04:20
6c6c983
to
1db7d2d
Compare
Codecov Report
@@ Coverage Diff @@
## develop #17671 +/- ##
===========================================
- Coverage 59.62% 57.81% -1.82%
===========================================
Files 759 759
Lines 68612 68620 +8
Branches 5971 5971
===========================================
- Hits 40912 39672 -1240
- Misses 24285 25533 +1248
Partials 3415 3415
Flags with carried forward coverage won't be shown. Click here to find out more. |
sagarvora
force-pushed
the
perf-get-fetch-values
branch
from
August 2, 2022 03:32
1db7d2d
to
e5b4b06
Compare
ankush
approved these changes
Aug 5, 2022
mergify bot
pushed a commit
that referenced
this pull request
Aug 5, 2022
* perf: reduce DB calls made in `get_fetch_values` * fix: ensure return value is same as before * test: add test for `frappe.model.utils.get_fetch_values` (cherry picked from commit f9bfbfe)
ankush
pushed a commit
that referenced
this pull request
Aug 5, 2022
* perf: reduce DB calls made in `get_fetch_values` * fix: ensure return value is same as before * test: add test for `frappe.model.utils.get_fetch_values` (cherry picked from commit f9bfbfe) Co-authored-by: Sagar Vora <sagar@resilient.tech>
sagarvora
added a commit
that referenced
this pull request
Aug 5, 2022
* perf: reduce DB calls made in `get_fetch_values` * fix: ensure return value is same as before * test: add test for `frappe.model.utils.get_fetch_values` (cherry picked from commit f9bfbfe)
ankush
pushed a commit
that referenced
this pull request
Aug 5, 2022
* perf: reduce DB calls made in `get_fetch_values` * fix: ensure return value is same as before * test: add test for `frappe.model.utils.get_fetch_values` (cherry picked from commit f9bfbfe) Co-authored-by: Sagar Vora <sagar@resilient.tech>
frappe-pr-bot
pushed a commit
that referenced
this pull request
Aug 9, 2022
# [13.37.0](v13.36.3...v13.37.0) (2022-08-09) ### Bug Fixes * allow system managers to toggle email queue ([c004846](c004846)) * allow to import time field ([#17677](#17677)) ([#17690](#17690)) ([59f58c7](59f58c7)) * check permission before sending email ([bb73014](bb73014)) * Dropdown selection list in Reports should be translatable ([#17679](#17679)) ([8c0e5ab](8c0e5ab)) * **global_search:** Trigger rebuilding on Custom Field's property change ([#17705](#17705)) ([b4ff5b2](b4ff5b2)) * max_positive_value for Integer types ([#17712](#17712)) ([#17713](#17713)) ([e173e64](e173e64)) * merge conflict ([2f71fb1](2f71fb1)) * restored patch and remove unused import ([b2232f1](b2232f1)) * return promise ([#17646](#17646)) ([#17666](#17666)) ([d931e26](d931e26)) * Show Report & Dashboard View for File Doctype (backport [#17688](#17688)) ([#17695](#17695)) ([ad09e87](ad09e87)) * version bump regex in automated release ([#17725](#17725)) ([#17726](#17726)) ([a4f682a](a4f682a)) ### Features * Role based permission for Dashboard Chart ([#17634](#17634)) ([#17655](#17655)) ([c3f45e7](c3f45e7)) ### Performance Improvements * reduce DB calls in `frappe.client.get` (and other changes) (backport [#17665](#17665)) ([#17710](#17710)) ([5fe4924](5fe4924)) * reduce DB calls made in `get_fetch_values` ([#17671](#17671)) ([#17738](#17738)) ([fc58a87](fc58a87)) * specify reference doctype in filters ([#17703](#17703)) ([88a59d8](88a59d8))
frappe-pr-bot
pushed a commit
that referenced
this pull request
Aug 11, 2022
# [14.1.0](v14.0.2...v14.1.0) (2022-08-11) ### Bug Fixes * add_user_permission with applicale_for arg set not updating in user permission ([804ce72](804ce72)) * assume parentfield to be set and valid ([e28674b](e28674b)) * check permlevel only if > 0 ([63f2cf5](63f2cf5)) * consistent fieldnames and keep port alongside server field ([c4f1619](c4f1619)) * **db:** Log mogrified queries ([ba1cdf8](ba1cdf8)) * dont init child doc ([94b760c](94b760c)) * dont pass doc to tooltip formatter on reportview ([d049c87](d049c87)) * german translations ([#17663](#17663)) ([#17771](#17771)) ([fd3eaa6](fd3eaa6)) * get correct doc when checking child table permission ([9b89dc6](9b89dc6)) * handle permlevel ([06ebd95](06ebd95)) * ignore built assets in translation ([53357e2](53357e2)) * ignore forms without docs in realtime events ([afc060f](afc060f)) * init only existing single doctypes ([75b6a33](75b6a33)) * limit allowed attributes for lazy images ([#17775](#17775)) ([1311564](1311564)) * **patch:** update multi step webform's Section Break fields to Page Break ([#17797](#17797)) ([#17798](#17798)) ([b3dc4c0](b3dc4c0)) * raise ImplicitCommitError instead of bare exception ([e2c6497](e2c6497)) * reverse logic for failing permission check ([7891674](7891674)) * **sanitize-html:** allow all data-* attrs ([9b94479](9b94479)) * send all messages on boot instead of scanning ([d61b7e8](d61b7e8)) * update append_to misleading message in email account ([#17718](#17718)) ([#17796](#17796)) ([cd86462](cd86462)) * **ux:** email domain doctype ([48c4a8d](48c4a8d)) * Webform Misc Fix (backport [#17642](#17642)) ([#17746](#17746)) ([86f9fbc](86f9fbc)) ### Features * JS extractor and custom JS parser ([fed4ae9](fed4ae9)) * **minor:** add connection link to email accounts in email domain ([821549d](821549d)) * **minor:** fetch attachment_limit from get_max_file_size api ([5190a49](5190a49)) * modified parser for frappe JS translate syntax ([0e87d21](0e87d21)) * Multilanguage sites: language selector only will show "enabled" languages and language default always will be System default ([#17745](#17745)) ([e5b8a47](e5b8a47)) * use AST to extract translation sources ([e02a73f](e02a73f)) ### Performance Improvements * reduce DB calls made in `get_fetch_values` ([#17671](#17671)) ([#17739](#17739)) ([dc19f69](dc19f69)) ### Reverts * Remove emoji from doctype ([c102124](c102124))
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes Made
frappe._dict
instead of a regular dictNote: This function is used in ERPNext, but not Frappe.
Performance Improvement
Tested
SalesInvoice.set_missing_lead_customer_details
withline_profiler
Before
After (~50% better)