TDB2: Move gc() processing to TF2::load_tasks()
Reduce the amount of copies necessary for TDB2::gc() by moving the GC processing to the Task object source - TF2::load_tasks(). This entangles TDB2 and TF2 more than previously, but leads to huge performance benefits: - "next" performance test down 21% - "list" performance test down 11% - "all" performance test down 4% - "export" performance test down 9% The "gc" measurement is down 96% for all performance tests. This is a result of moving the actual processing into TF2::load_gc() and not measuring the time taken by that function as "gc" time.
This commit is contained in:
@@ -59,7 +59,9 @@ public:
|
||||
void clear_lines ();
|
||||
void commit ();
|
||||
|
||||
void load_tasks ();
|
||||
Task load_task (const std::string&);
|
||||
void load_gc (Task&);
|
||||
void load_tasks (bool from_gc = false);
|
||||
void load_lines ();
|
||||
|
||||
// ID <--> UUID mapping.
|
||||
@@ -71,10 +73,8 @@ public:
|
||||
void clear ();
|
||||
const std::string dump ();
|
||||
|
||||
private:
|
||||
void dependency_scan ();
|
||||
|
||||
public:
|
||||
bool _read_only;
|
||||
bool _dirty;
|
||||
bool _loaded_tasks;
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
void commit ();
|
||||
void get_changes (std::vector <Task>&);
|
||||
void revert ();
|
||||
int gc ();
|
||||
void gc ();
|
||||
int next_id ();
|
||||
int latest_id ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user