-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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: use get_cached_value
instead of db.get_value
in controllers
#32776
perf: use get_cached_value
instead of db.get_value
in controllers
#32776
Conversation
9e69b3d
to
6223c52
Compare
@DaizyModi / @sagarvora make sure the numbers are without using local.cache{} between loops that timit executes (probably by writing simple test wrapper) Otherwise it will be grossly misleading. I've seen simple queries + db.value_cache often being faster than get_cached_value. Also db.value_cache is more reliable from cache eviction pov. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #32776 +/- ##
===========================================
- Coverage 63.81% 63.81% -0.01%
===========================================
Files 817 817
Lines 58510 58508 -2
===========================================
- Hits 37339 37337 -2
Misses 21171 21171
|
@Mergifyio backport version-14-hotfix version-13-hotfix |
✅ Backports have been created
|
…-32776 perf: use `get_cached_value` instead of `db.get_value` in controllers (backport #32776)
# [14.6.0](v14.5.1...v14.6.0) (2022-11-08) ### Bug Fixes * `Material Consumption` option in case of `Skip Transfer to WIP` in WO ([8c856cd](8c856cd)) * add translate function to name of chart labels in budget_variance_report.py ([16f364d](16f364d)) * add translate function to name of chart labels in deferred_revenue_and_expense.py ([b8caa58](b8caa58)) * add translate function to period in stock_analytics.py ([b0c06d5](b0c06d5)) * add translate function to period in sales_analytics.py ([e681f06](e681f06)) * add translate function to string on budget_variance_report.js to match the variance word translated ([595aaad](595aaad)) * Auto advance allocation against partial invoices ([b7763d9](b7763d9)) * auto increment qty if item table has no items ([d8e403b](d8e403b)) * conflicts ([ab87a95](ab87a95)) * correct linters ([8f6f9a4](8f6f9a4)) * correct linters ([440e208](440e208)) * correct linters ([5acc9be](5acc9be)) * Create POS Opening Entry POS Profile filter. ([60af9c0](60af9c0)) * Disable tax included prices for internal transfers ([#32794](#32794)) ([6838e5e](6838e5e)) * for asset's purchase_date, if bill_date is set, use that instead of posting_date ([01a1c96](01a1c96)) * get `consumed_qty` based on `received_qty` in SCR ([ea9a502](ea9a502)) * Increase columns width in Warehouse wise Item Balance Age and Value ([0b09c31](0b09c31)) * linter ([af60c8f](af60c8f)) * make `BOM` required in SCR Item ([3f79a05](3f79a05)) * make `consumed_qty` editable when backflush based on Material Transfer ([2c5a8c4](2c5a8c4)) * make `consumed_qty` read-only in SCR Supplied Items ([68229f0](68229f0)) * map `BOM` while mapping the return SCR ([e629cba](e629cba)) * mysql syntax issue ([4d9bbd4](4d9bbd4)) * not able to select customer / supplier ([6989cdf](6989cdf)) * refactor code for better translatable string ([2dc24f2](2dc24f2)) * refactor code for better translatable string in stock_ageing.py ([0ead516](0ead516)) * rename test method ([97445d9](97445d9)) * Scan Barcode UX ([1944f4d](1944f4d)) * set `received_qty` before_validate SCR ([e316558](e316558)) * test cases ([0feec4c](0feec4c)) * trailing whitespace ([31bada9](31bada9)) * update advance paid in SO/PO from Payment Ledger ([a561432](a561432)) * use `flt` instead of `cint` in `get_batch_no` ([6510464](6510464)) ### Features * Item Wise TDS Calculation ([b9fb104](b9fb104)) ### Performance Improvements * use `get_cached_value` instead of `db.get_value` in controllers ([#32776](#32776)) ([34ca17a](34ca17a))
Replaced
db.get_value
withget_cached_value
for masters doctype in Controllers file.Before
After (without local cache)
Closes #32720