Commit 6fde18eb by Őry Máté

dashboard: prefetch vm subactivities for performance

parent 8b39c899
......@@ -197,10 +197,11 @@ class VmDetailView(CheckedDetailView):
})
# activity data
ia = InstanceActivity.objects.filter(
instance=self.object, parent=None
).order_by('-started').select_related()
context['activities'] = ia
context['activities'] = (
InstanceActivity.objects.filter(
instance=self.object, parent=None).
order_by('-started').
select_related('user').prefetch_related('children'))
context['vlans'] = Vlan.get_objects_with_level(
'user', self.request.user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment