A simple, yet significiant, optimization
Every annotated commodity is based on a "referent", or the unannotated version of that commodity. When stripping all annotations away, however, rather than simply returning the referent we were actually searching for it by name. There was no reason to do this, not to mention it was taking up to 7% of the total runtime of some reports.
This commit is contained in:
parent
4a0236e964
commit
30479c0e12
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ annotated_commodity_t::strip_annotations(const keep_details_t& what_to_keep)
|
|||
keep_date ? details.date : none,
|
||||
keep_tag ? details.tag : none));
|
||||
} else {
|
||||
new_comm = pool().find_or_create(base_symbol());
|
||||
new_comm = &referent();
|
||||
}
|
||||
|
||||
assert(new_comm);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue