summaryrefslogtreecommitdiff
path: root/src/commit2.c
diff options
context:
space:
mode:
authorslioch <slioch@eng-140.vyatta.com>2009-10-10 23:24:15 -0700
committerslioch <slioch@eng-140.vyatta.com>2009-10-10 23:24:15 -0700
commitb46bcdc5ab62756dc71c48871c03eb312282dcac (patch)
tree7d19e029b221c4350ee7e0ee58bfa5b882065f27 /src/commit2.c
parent3d86f968326b46d1f78ac208f383232d1bdb8408 (diff)
downloadvyatta-cfg-b46bcdc5ab62756dc71c48871c03eb312282dcac.tar.gz
vyatta-cfg-b46bcdc5ab62756dc71c48871c03eb312282dcac.zip
performance optimization on commit. On successful commits (i.e. no failures) will improve performance by avoiding the piecewise priority based copy and just
copy the complete configuration once. On specific test configuration performance improvement brought commit boot time down from >15 minutes to less than 10 minutes.
Diffstat (limited to 'src/commit2.c')
-rw-r--r--src/commit2.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/commit2.c b/src/commit2.c
index 4215ccc..42f2ce5 100644
--- a/src/commit2.c
+++ b/src/commit2.c
@@ -284,14 +284,15 @@ main(int argc, char** argv)
} while ((trans_child_node = (GNode*)g_node_nth_child((GNode*)trans_coll,(guint)i)) != NULL);
if (no_errors == TRUE) {
- if (disable_partial_commit == TRUE && g_dump_actions == FALSE) {
- completed_root_node_coll = g_slist_append(completed_root_node_coll,orig_node_tree);
- }
+ // if (disable_partial_commit == TRUE && g_dump_actions == FALSE) {
+ // completed_root_node_coll = g_slist_append(completed_root_node_coll,orig_node_tree);
+ // }
/*
* Need to add to the following func below to clean up dangling .wh. files
*/
if (g_dump_actions == FALSE) {
- complete(completed_root_node_coll, test_mode);
+ // complete(orig_node_tree, test_mode);
+ common_commit_copy_to_live_config(orig_node_tree, TRUE, test_mode);
common_commit_clean_temp_config(orig_node_tree, test_mode);
}
if (g_debug == TRUE) {
@@ -510,7 +511,7 @@ complete(GSList *node_coll, boolean test_mode)
}
}
//on transactional nodes only, note to avoid calling this if a headless root
- common_commit_copy_to_live_config(l->data, test_mode);
+ common_commit_copy_to_live_config(l->data, FALSE, test_mode);
}
return TRUE;
}