mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-07-18 00:55:50 +00:00
perf(epg): defer loading of programme_index in EPGSourceViewSet for performance improvement
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
parent
690fa10be4
commit
1e9fd28653
1 changed files with 2 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ class EPGSourceViewSet(viewsets.ModelViewSet):
|
|||
from apps.channels.models import Channel
|
||||
return EPGSource.objects.select_related(
|
||||
"refresh_task__crontab", "refresh_task__interval"
|
||||
).defer(
|
||||
'programme_index'
|
||||
).annotate(
|
||||
has_channels=Exists(
|
||||
Channel.objects.filter(epg_data__epg_source_id=OuterRef('pk'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue