I was profiling some of our code which uses HL7, and I noticed that we had a large number of calls to java.util.Pattern#compile.
I tracked a number of them down to SegmentFinder#matches method. I would therefore suggest the patch below, which cuts down the number of Pattern#compile calls from 4 to 1.
The unit tests passes. I have written the code myself and would like to submit it under the same GPL/MPL license as the rest of the code.
oops - forgot to add the patch file before saving
And I think this could go into the next minor release - it doesn't need to be milestone Future (but I cannot edit that).
Duplicate of bug 242 - I hadn't noticed that it was already entered as a bug.
https://sourceforge.net/p/hl7api/bugs/242/
Please close or delete.
Duplicate of https://sourceforge.net/p/hl7api/bugs/242/.