[wp-hackers] RE: slow posting..

Adi Sieker ml at sieker.info
Tue Dec 7 11:32:06 UTC 2004

Donncha O Caoimh wrote:
> Adding enclosures to posts shouldn't slow things down much - I issue a 
> HEAD request for the linked media file and close the connection after I 
> receive two carriage returns. That way it doesn't matter if keep alives 
> are on or not. We could do the same with the 
> discover_pingback_server_uri function perhaps? I haven't looked at that 
> code yet but it seems like a good bet for speeding things up!
discover_pingback_server_uri reads in the http header and
if it doesn't find a X-pingback header continues to read in
the first 2048 bytes of the file (after the two carrige returns) to see
wether a rel=pingback url can be found. If the file is smaller than 2048
(which admittely doesn't happen often) fgets waits for the timeout. A
simple fix I have tried is switching to HTTP 1.0 in the request, which
also works on my virutal hosted domains.


> Donncha.
> Adi Sieker wrote:
>> Has this missed peoples attention or isn't interesting or
>> am I totally off my head? :))
>> Regards
>>     Adi
>> Adi Sieker wrote:
>>> Hi,>> for HTTP 1.1 which is causing fgets to block until a timeout.
>>> Using HTTP 1.0 in the request won't cause the webserver to use 
>>> keepalive and everything
>>> speeds. To sum it up:
>>> 1. You need an url in the post.
>>> 2. The contents of the file the url points to needs to be smaller 
>>> than 2048 bytes.
>>> 3. The webserver the url points to needs to use keepalive per default 
>>> for HTTP 1.1 connections.
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org

Adi J. Sieker                                   http://www.sieker.info/
Freelance developer           http://www.sieker.info/wiki.php?id=Profil

More information about the hackers mailing list