8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Make Linux build faster.

It seems the usage of databases with FW=ON in ext4 filesystems mounted with barriers=1 (default) is very slow.

This change decreased build time in my machine from 2m41s to 1m21s.
This commit is contained in:
asfernandes 2011-08-21 04:11:41 +00:00
parent 9370bd1bf7
commit 7545b8d172
3 changed files with 12 additions and 0 deletions

View File

@ -239,13 +239,16 @@ security.fdb: $(SRC_ROOT)/dbs/security.sql
-$(RM) $@
-$(RM) $(SECURITY_TMP)
echo create database \'$(SECURITY_TMP)\'\; | $(ISQL)
gfix -write async $(SECURITY_TMP)
$(ISQL) -i $^ $(SECURITY_TMP)
$(CHMOD) a=rw $(SECURITY_TMP)
$(CP) $(SECURITY_TMP) $@
gfix -write sync $@
msg.timestamp: $(MSG_FILES)
-$(RM) msg.fdb
echo create database \'msg.fdb\'\; | $(ISQL)
gfix -write async msg.fdb
for sql in $(MSG_FILES); do (echo $$sql; $(ISQL) -i $$sql msg.fdb) || exit; done
$(TOUCH) $@

View File

@ -120,6 +120,7 @@ $(EXAMPLES_DEST)% : $(EXAMPLES_SRC)%
$(EMPLOYEE_DB): $(EXAMPLES_DEST)/empbuild$(EXEC_EXT) $(INPUT_Sources) $(EXAMPLES_DEST)/isql$(EXEC_EXT)
-$(RM) $(EMPLOYEE_DB)
./empbuild $(EMPLOYEE_DB)
gfix -write sync $(EMPLOYEE_DB)
-$(CHMOD_6) $(EMPLOYEE_DB)
# To get past the fact isql is called from the programs, we create a local link in this directory

View File

@ -93,6 +93,14 @@ if (SQLCODE)
exit (FINI_ERROR);
}
printf ("Turning forced writes off\n");
sprintf (cmd, "gfix -write async %s", Db_name);
if (system (cmd))
{
printf ("Couldn't turn forced writed off\n");
exit (FINI_ERROR);
}
printf ("Creating tables\n");
sprintf (cmd, "isql %s -q -i empddl.sql", Db_name);
if (system (cmd))