performance importing pages

"matthew warren" <[email protected]> Sun, 29 May 2005 12:12:28 +0000
Newsgroups gmane.comp.web.wiki.moin.devel
Message-ID <[email protected]>
Ok, I have found a way to speed it up, but was wondering if anyone could 
help be work out why it works, and what really needs fixing on my system;

If i change editlog.py and alter the following lines in the EditLog class,

      import socket

            if host is None:
                host = request.remote_addr

            #try:
            #    hostname = socket.gethostbyaddr(host)[0]
            #except socket.error:
            #    hostname = host
            hostname='localhost'
            remap_chars = {u'\t': u' ', u'\r': u' ', u'\n': u' ',}
            comment = comment.translate(remap_chars)
            user_id = request.user.valid and request.user.id or ''


..IE; comment out the try/except clause and force hostname to be 'localhost' 
then it all moves quickly.

Anyone any ideas as to why it was going slow on my system?

thanks,

Matt.

_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters! 
http://www.msn.co.uk/newsletters



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005