diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-03 01:26:30 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-03 01:26:30 -0400 |
commit | 30479c0e1283201f905e2129970ad4784c9c5ba2 (patch) | |
tree | 38fadc893e4f7b601f068169a1fefc3e37fdbf72 /src/annotate.cc | |
parent | 4a0236e964f5b39f38c3a8cd560bcfe6e4878912 (diff) | |
download | fork-ledger-30479c0e1283201f905e2129970ad4784c9c5ba2.tar.gz fork-ledger-30479c0e1283201f905e2129970ad4784c9c5ba2.tar.bz2 fork-ledger-30479c0e1283201f905e2129970ad4784c9c5ba2.zip |
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.
Diffstat (limited to 'src/annotate.cc')
-rw-r--r-- | src/annotate.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/annotate.cc b/src/annotate.cc index 99c12fc3..feb3b3ca 100644 --- a/src/annotate.cc +++ b/src/annotate.cc @@ -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); |