aboutsummaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-28 11:09:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-30 10:10:36 +0100
commitef28fcd7feb13db21572d28549427ee153957097 (patch)
treedcdf0df760d32a3a56ff8900c425add9e78c4741 /bitbake/bin
parentf80334d8aa680c249d84df9109ceca9e7a479cdd (diff)
downloadopenembedded-core-contrib-ef28fcd7feb13db21572d28549427ee153957097.tar.gz
bitbake: bin/bitbake/cooker: Ensure initial featureset is optimal
If the featureset didn't match the defaults, we'd pay the price of two base configuration parses which showed up adversely in the performance benchmarks. This also passes the feature set into the cooker creation so in the common case we don't have to reset the server. This speeds up both knotty and hob startup. If the featureset doesn't match, the system will reset as before, this just streamlines the common case. (Bitbake rev: 1249543c4dbf3edeac033d888497864cfc807a4e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/bitbake16
1 files changed, 9 insertions, 7 deletions
diff --git a/bitbake/bin/bitbake b/bitbake/bin/bitbake
index b173f16ce1..cd01992bae 100755
--- a/bitbake/bin/bitbake
+++ b/bitbake/bin/bitbake
@@ -203,7 +203,7 @@ class BitBakeConfigParameters(cookerdata.ConfigParameters):
return options, targets[1:]
-def start_server(servermodule, configParams, configuration):
+def start_server(servermodule, configParams, configuration, features):
server = servermodule.BitBakeServer()
if configParams.bind:
(host, port) = configParams.bind.split(':')
@@ -216,7 +216,7 @@ def start_server(servermodule, configParams, configuration):
try:
configuration.setServerRegIdleCallback(server.getServerIdleCB())
- cooker = bb.cooker.BBCooker(configuration)
+ cooker = bb.cooker.BBCooker(configuration, features)
server.addcooker(cooker)
server.saveConnectionDetails()
@@ -296,9 +296,14 @@ def main():
# Clear away any spurious environment variables while we stoke up the cooker
cleanedvars = bb.utils.clean_environment()
+ featureset = []
+ if not configParams.server_only:
+ # Collect the feature set for the UI
+ featureset = getattr(ui_module, "featureSet", [])
+
if not configParams.remote_server:
# we start a server with a given configuration
- server = start_server(servermodule, configParams, configuration)
+ server = start_server(servermodule, configParams, configuration, featureset)
bb.event.ui_queue = []
else:
# we start a stub server that is actually a XMLRPClient that connects to a real server
@@ -307,9 +312,6 @@ def main():
server.saveConnectionConfigParams(configParams)
if not configParams.server_only:
- # Collect the feature set for the UI
- featureset = getattr(ui_module, "featureSet", [])
-
if configParams.status_only:
try:
server_connection = server.establishConnection(featureset)
@@ -326,7 +328,7 @@ def main():
if configParams.kill_server:
bb.fatal("Server already killed")
configParams.bind = configParams.remote_server
- start_server(servermodule, configParams, configuration)
+ start_server(servermodule, configParams, configuration, featureset)
bb.event.ui_queue = []
server_connection = server.establishConnection(featureset)