You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by svarnau <gi...@git.apache.org> on 2016/02/04 02:41:19 UTC
[GitHub] incubator-trafodion pull request: [TRAFODION-1614] Improve time to...
GitHub user svarnau opened a pull request:
https://github.com/apache/incubator-trafodion/pull/306
[TRAFODION-1614] Improve time to build external dependencies
This script is for one-time set-up of build environment (aka TOOLSDIR),
but an hour or more is excessive, per the JIRA. So to shrink the time, we kick off all
the builds in background. All the builds are independent, except
that LLVM depends on udis86.
LLVM is the long pole in build time. Biggest gain is building the
two flavors of LLVM in parallel. All the other tools can be
downloaded and built while we are waiting for LLVM.
Factoring download speed out of the equation (pre-downloaded the source tar files), it took me 26 minutes to build everything. Roughly 50% improvement.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/svarnau/incubator-trafodion setup
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/306.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #306
----
commit bb58c066fee9087dc81a06a99a0bd19043342a72
Author: Steve Varnau <st...@esgyn.com>
Date: 2016-02-04T00:17:55Z
[TRAFODION-1614] Improve time to build external dependencies
This script is for one-time set-up of build environment (aka TOOLSDIR),
but an hour or more is excessive. So to shrink the time, we kick off all
the builds in background. All the builds are independent, except
that LLVM depends on udis86.
LLVM is the long pole in build time. Biggest gain is building the
two flavors of LLVM in parallel. All the other tools can be
downloaded and built while we are waiting for LLVM.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [TRAFODION-1614] Improve time to...
Posted by robertamarton <gi...@git.apache.org>.
Github user robertamarton commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/306#discussion_r51919029
--- Diff: install/traf_tools_setup.sh ---
@@ -93,13 +93,38 @@ function downloadSource
fi
}
+LOGDIR=$(pwd)
+LOGFILE=$LOGDIR/traf_tools_setup.log
+BLDLOG=$LOGDIR/traf_tools_bld
+
+# -----------------------------------------------------------------------------
+# execute build functions in background
+# $1 - short name of component (single word, also used in logfile name)
+# $2 - first make target (usually empty string for the default target)
+# $3 - second make target
+# $4 - dir/file to check for success
+# -----------------------------------------------------------------------------
+function bkgBuild
+{
+ LOG=${BLDLOG}-${1}.log
+ echo "INFO: Starting background make and install for $1" | tee -a $LOGFILE
+
+ (make $2 > $LOG 2>&1
+ echo "INFO: make completed" > $LOG
+ make $3 > $LOG 2>&1
+ if [[ ! -e $4 ]]; then
+ echo "ERROR: failed to install $1" | tee -a $LOGFILE
+ echo " see details in $LOG" | tee -a $LOGFILE
+ exit 2;
+ fi
+ echo "INFO: $1 install complete at $(date), files placed in $TOOLSDIR" | tee -a $LOGFILE
+ ) &
+}
# main code
TOOLSDIR=
BASEDIR=
-LOGDIR=`pwd`
-LOGFILE=$LOGDIR/traf_tools_setup.log
rm $LOGFILE 2>/dev/null
--- End diff --
where does the LOGFILE variable get set?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] incubator-trafodion pull request: [TRAFODION-1614] Improve time to...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-trafodion/pull/306
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---