Discussion:
performance importing pages
matthew warren
2005-05-29 12:12:28 UTC
Permalink
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
Alexander Schremmer
2005-05-29 12:56:42 UTC
Permalink
Post by matthew warren
If i change editlog.py and alter the following lines in the EditLog class,
..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?
Your DNS timed out while resolving the hostname for the IP 127.0.0.127. I
think it should be better to use the normal localhost IP for RequestCLI. If
I cannot find any problems with this change, I will fix it in the code.

Kind regards,
Alexander



-------------------------------------------------------
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
Continue reading on narkive:
Loading...