Using glibc regex
This patch replaces internal dm_regex and uses glibc regex routines so we achieve better performance for things like hundreds patterns.
Needs some testing...
Zdenek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Switch-to-glibc-regex-to-speedup-pattern-matching.patch
Type: text/x-patch
Size: 9246 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20100420/3bdf39bf/attachment.bin>
Quoted 2 lines · Zdenek Kabelac
This patch replaces internal
dm_regexand uses glibc regex routines so we achieve better performance for things like hundreds patterns.
How about getting 3 versions of this code into the tree in parallel for a while?
1) current cvs with optimiser
2) new ejt dfa changes
3) glibc regex
Put the bits that differ into separate files, keeping the tree reasonably clean but not worrying too much about refactoring to avoid code duplication - eventually two out of the three will be thrown away.
When we want to match a string, test against all 3 engines and if the results differ, report the details and take the majority answer. (A standard configure/lvm.conf setting could control which of the 3 are used.) We could generate timing statistics too for all three (extend lib/misc/timestamp,c) dumped when the process exits.
With all three enabled by default, the additional overhead shouldn't matter for most people - it should be absorbed within the speedups we've recently obtained so the sum of the 3 ought to still run faster than the 1 did before.
Alasdair
Quoted 3 lines · Alasdair G Kergon
1) current cvs with optimiser
2) new ejt dfa changes
3) glibc regex
Or for testing purposes or where the current slowness doesn't matter,
4) current cvs without optimiser
and in the event of disagreement, that answer trumps the others.
Alasdair