seitime-frappe/frappe/database
Ankush Menat 4754ab71d1
perf(minor): remove unnecessary comprehensions
- remove several unnecessary comprehensions from functions that accept a generator.
- Using `[x for x in iter]` causes a list to be built first then passed to the outer function.
- `any` and `all` can take generator instead. This makes memory usage O(1) and actually makes these functions short-circuiting. E.g. if the first condition fails then `all` will immediately return false instead of evaluating all the entries.
- `sum`, `min`, `max` => memory usage become O(1)
- `list`, `set`, `.join()` => roughly halves memory usage, as list is not required to be built.
- lastly, it's two fewer characters to read/think about.
2021-05-12 20:38:18 +05:30
..
mariadb fix: Don't hide warnings unnecessarily 2021-05-05 18:51:51 +05:30
postgres refactor: remove six dependency 2021-05-07 07:42:04 +05:30
__init__.py fix: do not set db_host to % and instead pass to setup_db 2020-03-06 13:02:26 +05:30
database.py perf(minor): remove unnecessary comprehensions 2021-05-12 20:38:18 +05:30
db_manager.py refactor: Meaningful variable names 2020-11-09 18:54:47 +05:30
schema.py chore: change an instance of virtual_doctype to is_virtual 2021-01-11 13:13:39 +05:30