summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
diff options
context:
space:
mode:
authorMarius Avram <marius.avram@intel.com>2014-02-18 16:39:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-09 12:23:58 -0700
commit1660519e5ceca873aaab0eb3aac6495be5f80dc2 (patch)
tree568c6c585a49139f3d306e5666764dd52e1fd535 /bitbake/lib/bb/ui
parent06f9059abc405197584acf189fac374047af395c (diff)
downloadpoky-1660519e5ceca873aaab0eb3aac6495be5f80dc2.tar.gz
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>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index a0f10952f0..54f6c4ebe8 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -612,11 +612,21 @@ class BuildInfoHelper(object):
612 task_info['task_name'] = taskname 612 task_info['task_name'] = taskname
613 task_obj = self.orm_wrapper.get_update_task_object(task_info) 613 task_obj = self.orm_wrapper.get_update_task_object(task_info)
614 return task_obj 614 return task_obj
615
616 # create tasks
617 tasks = {}
618 for taskdesc in event._depgraph['tdepends']:
619 tasks[taskdesc] = _save_a_task(taskdesc)
615 620
621 # create dependencies between tasks
616 for taskdesc in event._depgraph['tdepends']: 622 for taskdesc in event._depgraph['tdepends']:
617 target = _save_a_task(taskdesc) 623 target = tasks[taskdesc]
618 for taskdesc1 in event._depgraph['tdepends'][taskdesc]: 624 for taskdep in event._depgraph['tdepends'][taskdesc]:
619 dep = _save_a_task(taskdesc1) 625 if taskdep not in tasks:
626 # Fetch tasks info is not collected previously
627 dep = _save_a_task(taskdep)
628 else:
629 dep = tasks[taskdep]
620 Task_Dependency.objects.get_or_create( task = target, depends_on = dep ) 630 Task_Dependency.objects.get_or_create( task = target, depends_on = dep )
621 631
622 def store_build_package_information(self, event): 632 def store_build_package_information(self, event):