Re: Two bugs in 4.1.1
Brazen <odbrazen-/[email protected]> Sun, 25 Jul 2004 09:03:06 -0700 (PDT)
| Newsgroups | gmane.comp.games.mud.client.lyntin |
|---|---|
| Message-ID | <[email protected]> |
--- Tuomas_Härkönen <[email protected]> wrote: > > <snip> > > summary: 10k characters on a line is slow, much much slower than 10 chars > > on a thousand lines. > > </snip> > > <...snip...> > > Could you try this without any of your own regexps loaded (or confirm you > > didn't have any of your own regexps loaded) so we can be sure the bad regexp > > is in the core code? > > The only regexp I've changed is SEMI_REGEXP in utils.py, which is the > command separator. However, since I've made some other local hacks, I > also tested this on the 4.1.1-release as well as CVS version (checked > out yesterday), and the problem persists. It was the line regexp in net.py, it was using a look ahead that consumes an awful amount of time for long lines. Worse, it would do it each time it read from the socket so it would spin CPU scanning a 1k string, 2k string, 3k string .. to whowever big the string is. I checked in a change to net.py that avoids this. A 50k line prints almost instantly. Sourceforge lags reality by a day or so, let me know if you want a copy by mail. -Brazen __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click