aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-24 11:40:55 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-24 11:52:14 +0100
commit7be76d8f79ea92fd4bd36146eb9a4b86551b526d (patch)
tree9ae687936c7421e7cbe32471af4fbc8bd81d3364 /lib/bb/data.py
parent90fdd69cca951f8bd2ff634f3b42fccd4fc03095 (diff)
downloadbitbake-7be76d8f79ea92fd4bd36146eb9a4b86551b526d.tar.gz
data_smart: Improve performance of infer_caller_details()
As things stand now, bitbake -e (which turns on all the caller tracking) of OE-Core generates around 9.5 million stat calls which is slow and the largest single thing on the profile data. This is because infer_caller_details() calls traceback.extract_stack() which adds line contents to the traceback. This in turn calls python's internal linecache code which calls stat on every file for every callback. We don't even use that info. We only even want a single frame of the stack. Instead, open code for the pieces of information we need. Also, only obtain the stack once for both halves of the infer_caller_details() code. This reduces the number of stat calls to around 0.5 million and significantly improves parsing with bitbake -e. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data.py')
0 files changed, 0 insertions, 0 deletions