bitbake: bb/ui: store_dependency_information optimization
This optimization is in support of the bug #5485. The function called at the beginning of every build: store_dependency_information was taking approximately 20sec and it was delaying the arrival of events from the event queue. The change minimizes the calls to _save_a_task(), reducing the time to half. (Bitbake rev: b86fd2be40303d886fdb9ad3009355584d285acc) Signed-off-by: Marius Avram <marius.avram@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
06f9059abc
commit
1660519e5c
|
@ -613,10 +613,20 @@ class BuildInfoHelper(object):
|
||||||
task_obj = self.orm_wrapper.get_update_task_object(task_info)
|
task_obj = self.orm_wrapper.get_update_task_object(task_info)
|
||||||
return task_obj
|
return task_obj
|
||||||
|
|
||||||
|
# create tasks
|
||||||
|
tasks = {}
|
||||||
for taskdesc in event._depgraph['tdepends']:
|
for taskdesc in event._depgraph['tdepends']:
|
||||||
target = _save_a_task(taskdesc)
|
tasks[taskdesc] = _save_a_task(taskdesc)
|
||||||
for taskdesc1 in event._depgraph['tdepends'][taskdesc]:
|
|
||||||
dep = _save_a_task(taskdesc1)
|
# create dependencies between tasks
|
||||||
|
for taskdesc in event._depgraph['tdepends']:
|
||||||
|
target = tasks[taskdesc]
|
||||||
|
for taskdep in event._depgraph['tdepends'][taskdesc]:
|
||||||
|
if taskdep not in tasks:
|
||||||
|
# Fetch tasks info is not collected previously
|
||||||
|
dep = _save_a_task(taskdep)
|
||||||
|
else:
|
||||||
|
dep = tasks[taskdep]
|
||||||
Task_Dependency.objects.get_or_create( task = target, depends_on = dep )
|
Task_Dependency.objects.get_or_create( task = target, depends_on = dep )
|
||||||
|
|
||||||
def store_build_package_information(self, event):
|
def store_build_package_information(self, event):
|
||||||
|
|
Loading…
Reference in New Issue