Re: [xml] Failure Index Query in RegxpExec

On Fri, Aug 24, 2007 at 04:00:48PM +0530, Ashwin wrote:


   In the case of FaRegxpExec function suppose I give an arbitrarily long
   input string for the grammar :-


   Ideally  I  suppose the execution should stop at 10 and return failure
   in case of an input more than the range, however the exec->index keeps
   moving to the end of the input

   string. In case of very long strings, avoiding this might be helpful.

  There is zillions way you could try to optimize. The problem is making sure
this is exact. At the moment I really don't care to try to optimize performances
like that, this is useless IMHO, it would just make the code even more complex
and even harder to make sure it is right.

   Also  is  there  any way to catch hold of the index where the matching

  No you generally can't as we use stateful parsing. If I wasn't using stateful
parsing then you would have *real* performance problems. Hopefully you 
understand my answer, if that's not the case, it means you still need to study
that code a lot more before suggesting to change it ;-)


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]