[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Selection is extremely slow when fields with common n
Re: [bug-recutils] Selection is extremely slow when fields with common name exist
Mon, 12 Aug 2013 19:01:49 +0200
On Thu, Aug 08, 2013 at 05:02:14PM +0200, Jose E. Marchesi wrote:
Running the script below, the recsel command takes forever (and
crashed). It seems to be related to having multiple fields with the
I just committed a patch with an optimization in the SEX expression
evaluator: now it does not eval the expression in permutations of field
names which are _not_ part of the expression. This makes the evaluation
of your example sex
Did you push it? I don't see any commit which looks like that in the repo.
Well, this is better than nothing :) More idas for optimizing the
evaluator highly welcomed!
Well presumably it's slow because it has to do a linear search through
the list of field values. So the obvious answer would be that for each field,
there should be a hash table keyed on the field value. That way, the search
time would go from O(n) to O(1). But perhaps you had already thought of
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://keys.gnupg.net or any PGP keyserver for public key.
Description: Digital signature