Commit graph

15 commits

Author SHA1 Message Date
Ankush Menat
c177431557
perf: Document objects without circular references (#17080)
* perf: `Document` objects without circular references

Circular references are usuallly considered bad for GC, avoiding them
since they don't seem to be necessary.

* fix: explicitly convert to weakref
2024-01-17 17:22:55 +05:30
Ankush Menat
03b6d8a4b0 test: add perf test for references 2024-01-15 12:32:07 +05:30
Ankush Menat
970a740164
revert: #22308 (#22389)
* Revert "chore: move function to correct file"

This reverts commit ebfdfa283b.

* Revert "refactor!: merge get_site_url into get_url (#22308)"

This reverts commit 2001bc278f.
2023-09-13 14:34:52 +05:30
David Arnold
2001bc278f
refactor!: merge get_site_url into get_url (#22308)
* chore: merge get_site_url into get_url

* fix: keep alias with deprecation notice
2023-09-11 15:09:05 +05:30
Sagar Vora
151874c035 test: ensure get_permitted_fieldnames is called only once per doc 2023-08-18 22:47:37 +05:30
Ankush Menat
8930d4b5e1
perf: drop ifnull from IS SET filter (#21822)
- Kinda confuses query planner (idk why it's not smart enough to
  understand but there are probably edge cases where it can't be done)
- `null != null` and `'' != null` both yield `null` which is falsy and
  won't be shown in results.

Alternate fix to https://github.com/frappe/frappe/pull/21817
2023-07-27 10:58:20 +05:30
Ankush Menat
2c99583247 perf: Lazily fetch shared documents
We eagerly fetch shared documents for ANY `get_list` query, even when
user has full read acess doctype, where it's moot to consider adding
shared document as separately.

This eliminates one entire db call from get_list and in most cases
get_list will translate to single DB call, hence probably worth the
additional complexity.
2023-07-22 18:04:35 +05:30
Ankush Menat
79532ea0f2 fix: incorrect cache clearing of assets
- Build version wasn't correctly computed since v14 update of build
  system. This makes client side cache useless.
- We clear cache assuming rapid reloads,but opening new tab also does
  that. This makes the cache effectively useless for most users.
2023-07-15 21:59:04 +05:30
Ankush Menat
8730de41f9
fix: Only clear doctype cache if specified (#21611) 2023-07-09 10:44:43 +05:30
Ankush Menat
d7990368a8
perf: preload more modules (#21557)
* perf: preload more modules

- bleach is used frequently for sanitization
- File gets imported anytime a private file is viewed. Indirect import
  of PIL is costly in each worker.

* test: warm up perf test
2023-07-02 21:47:21 +05:30
Ankush Menat
c73d9fb783 test: add perf test helper for counting rows read 2023-06-28 19:51:18 +05:30
Ankush Menat
cee2b50461 perf: single query db.set_value 2022-10-06 19:46:58 +05:30
Ankush Menat
656f6df257
fix: drop Meta cache during update (#18182) 2022-09-19 19:24:17 +05:30
Ankush Menat
c28ddcc3e6 test: basic perf test for rps on get_list 2022-09-19 16:21:20 +05:30
Ankush Menat
f5b8e5f015
perf: short-circuit guest connection and basic perf tests (#17988)
* perf: reorder condition to avoid redis call

* test: basic perf tests
2022-08-30 16:30:25 +05:30