[pcre-dev] [Bug 1288] Performance issue using C++ interface …

Página superior
Eliminar este mensaje
Autor: Philip Hazel
Fecha:  
A: pcre-dev
Asunto: [pcre-dev] [Bug 1288] Performance issue using C++ interface with UTF-8 enabled
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1288




--- Comment #3 from Philip Hazel <ph10@???> 2012-08-30 16:53:52 ---
On Thu, 30 Aug 2012, Tóth Tamás wrote:

> I'm a C++ programmer and the patch I've suggested is the required minimal code
> modification to work around the described performance issue.


Fine. Thanks.

> As I looked into the code and in my opinion there are two problems
> with current C++ code.
>
> 1. There are some PCRE_* flag that not supported by RE_Options through member
> functions. This is the smaller problem since these flags can be set directly
> (by RE_Options constructor and set_all_options member function).


I wonder if there should be some updated documentation for this?

> 2. The bigger problem that there is no way to set option flags for wrapped
> pcre_compile and pcre_exec individually. (Some flags are set automatically like
> anchoring due to calling PartialMatch or FullMatch, but most of them are
> unavailable through C++ interface).
>
> If you think these should be changed I can suggest some code modification for
> this purpose.


I have no opinion on this, as I have no C++ experience, though it seems
to me as a general rule that you should be able to set all the available
flags. I haven't paid too much attention to the C++ wrapper, because it
was being maintained by others.

I would not object to changes, but as well as code patches, I'd need
some documentation and also some tests added to pcrecpp_unittest.cc.

Regards,
Philip


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email