mirror of
https://git.yoctoproject.org/poky
synced 2026-09-12 06:49:32 +02:00
bitbake: toasterui: UI query performance improvements
We reduce the number of queries by using "select_related" to bring in more data in a single query. Improvements in project page refresh, recipes table and tasks table. (Bitbake rev: eefdae12120f879b555ba0a353277a18675eecbc) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
9c358bd1d7
commit
e133fbf301
@@ -362,11 +362,14 @@ class Task(models.Model):
|
||||
return "Not Executed"
|
||||
|
||||
def get_description(self):
|
||||
helptext = HelpText.objects.filter(key=self.task_name, area=HelpText.VARIABLE, build=self.build)
|
||||
if '_helptext' in vars(self) and self._helptext != None:
|
||||
return self._helptext
|
||||
try:
|
||||
return helptext[0].text
|
||||
except IndexError:
|
||||
return ''
|
||||
self._helptext = HelpText.objects.get(key=self.task_name, area=HelpText.VARIABLE, build=self.build).text
|
||||
except HelpText.DoesNotExit:
|
||||
self._helptext = None
|
||||
|
||||
return self._helptext
|
||||
|
||||
build = models.ForeignKey(Build, related_name='task_build')
|
||||
order = models.IntegerField(null=True)
|
||||
|
||||
Reference in New Issue
Block a user