Skip to content

Commit

Permalink
better performance in build and fix for --work-on-disk option
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey Zimin committed Jun 21, 2022
1 parent 164af6c commit 2cd1fde
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion scripts/build_db.sh
Expand Up @@ -235,7 +235,7 @@ else
exe eval tar zxf taxdump.tar.gz
cd ..
fi
build_taxdb $TAXONOMY_DIR/names.dmp $TAXONOMY_DIR/nodes.dmp | sort -t$'\t' -rnk6,6 -rnk5,5 > taxDB.tmp
build_taxdb $TAXONOMY_DIR/names.dmp $TAXONOMY_DIR/nodes.dmp | sort -S 20% -t$'\t' -rnk6,6 -rnk5,5 > taxDB.tmp
mv taxDB.tmp taxDB
echo "taxDB construction finished. [$(report_time_elapsed $start_time1)]"
fi
Expand Down
16 changes: 9 additions & 7 deletions src/set_lcas.cpp
Expand Up @@ -113,10 +113,10 @@ int main(int argc, char **argv) {
}
}

if (!Operate_in_RAM && Output_DB_filename.size() > 0) {
cerr << "You need to operate in RAM (flag -M) to use output to a different file (flag -o)" << endl;
return 1;
}
//if (!Operate_in_RAM && Output_DB_filename.size() > 0) {
// cerr << "You need to operate in RAM (flag -M) to use output to a different file (flag -o)" << endl;
// return 1;
//}

QuickFile db_file(DB_filename, "rw");
size_t db_file_size = db_file.size();
Expand All @@ -126,9 +126,6 @@ int main(int argc, char **argv) {
dat = slurp_file(DB_filename, db_file_size);
Database = KrakenDB(dat.data());
} else {
if (Output_DB_filename.size() > 0) {
//system("cp " + DB_filename + " " + Output_DB_filename);
}
Database = KrakenDB(db_file.ptr());
}

Expand Down Expand Up @@ -162,6 +159,11 @@ int main(int argc, char **argv) {
ofs.write(dat.data(), db_file_size);
ofs.close();
dat.clear();
} else if (!Pretend) {
if (Output_DB_filename.size() > 0) {
string cmd="cp " + DB_filename + " " + Output_DB_filename;
system(cmd.c_str());
}
}

UID_map_file.close();
Expand Down

0 comments on commit 2cd1fde

Please sign in to comment.