rDrama/files/helpers
TLSM 4d22d9bce2
Eager load get_posts for submission_listings.
Ported in logic from upstream to use SQLAlchemy eager loading instead
of repeated queries when building a submission_listing. Adjusted
loaded relationships to include only those used on TheMotte.

Using test data from seed_db, before and after:

GET /
|----------|--------|--------|--------|--------|--------|------------|
| Database | SELECT | INSERT | UPDATE | DELETE | Totals | Duplicates |
|----------|--------|--------|--------|--------|--------|------------|
| default  |   83   |   0    |   0    |   0    |   83   |     72     |
|----------|--------|--------|--------|--------|--------|------------|
Total queries: 83 in 0.031s

GET /
|----------|--------|--------|--------|--------|--------|------------|
| Database | SELECT | INSERT | UPDATE | DELETE | Totals | Duplicates |
|----------|--------|--------|--------|--------|--------|------------|
| default  |   14   |   0    |   0    |   0    |   14   |     0      |
|----------|--------|--------|--------|--------|--------|------------|
Total queries: 14 in 0.00718s
2022-11-28 12:55:31 -05:00
..
alerts.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
assetcache.py assetcache: add interface for non-Jinja consumers. 2022-08-30 16:23:09 -04:00
const.py themes: remove /r/Drama theme ("classic" and "classic_dark") 2022-11-21 06:13:12 -06:00
get.py Eager load get_posts for submission_listings. 2022-11-28 12:55:31 -05:00
images.py Add trailing LF to text files 2022-05-10 21:05:51 -04:00
jinja2.py themes: remove /r/Drama theme ("classic" and "classic_dark") 2022-11-21 06:13:12 -06:00
lazy.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
sanitize.py Fix some deprecations and factor out a helper function (#387) 2022-10-27 22:15:48 -05:00
security.py Convert text file line endings to LF. 2022-05-09 07:20:47 -05:00
strings.py Port get.py improvements from upstream. 2022-11-28 12:36:04 -05:00
wrappers.py Add active user counter logic; add to admin tools. 2022-09-05 00:44:13 -05:00