Re: [xml] Re: Thread-safety of XSLT contexts with shared dictionaries



On Fri, Jan 21, 2005 at 05:54:13PM +0000, Gary Coady wrote:
Daniel Veillard wrote:
 Applied, seems to give around 2% performances loss in kind of worse
case tests but it's bearable since it an exact solution to a nasty to debug
race otherwise.

 before (best of 5 tests)

test64:~/XML/xstc -> time nist-test.py -s -b .
Ran 5430 of 5430 tests: 500 failed 48 unimplemented

real    0m3.301s
user    0m2.879s
sys     0m0.422s
test64:~/XML/xstc ->

 after (best of 5 tests)

test64:~/XML/xstc -> time nist-test.py -s -b .
Ran 5430 of 5430 tests: 500 failed 48 unimplemented

real    0m3.358s
user    0m2.951s
sys     0m0.407s
test64:~/XML/xstc ->

 Commited. But it would be interesting to see if the global lock one 
would lead to less performance losses on non threaded applications, could
you send again the first patch but as an attachment ?

Daniel, thanks for committing the change.

I'm attaching the first patch. Well, mostly the first patch, with some 
extra code to make sure that a failure to initialize the mutex is 
recognised.

  I now get (again best of 5 runs) 

t64:~/XML/xstc -> time nist-test.py -s -b .
Ran 5430 of 5430 tests: 500 failed 48 unimplemented

real    0m3.309s
user    0m2.908s
sys     0m0.401s
test64:~/XML/xstc -> 

  We are nearly back to the same performances of unsafe code :-)

  I think creating the lock is more costly than expected, and that
it's a better solution for most users then. We are back basically
to the same level of performances on Linux/RHEL/NPTL, so I commited
that version overriding the previous one. If someone one day experience
too much contention 1/ the second patch is still archived 2/ the parser
is probably not the place where they will loose the most cycles waiting.

  thanks again,

Daniel
-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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