We've built a php frontend onto nutch. We're finding that this
interface is dreadfully slow and the problem is the interface between
the two languages.
Here's where the slow down is:
$url = 'http://localhost:8080/opensearch?query=' . $query .
'&start=' . $start_index .
'&hitsPerPage=' . HITS_PER_PAGE .
'&hitsPerSite=' . HITS_PER_SITE .
'&hitsPerDup=' . HITS_PER_DUP;
$xml_contents = file_get_contents ($url); <--------this step right
here is slow.
That above function call in our code can take between 5 to 12 seconds to
complete.
We tried the same function but called http://127.0.0.1:8080 instead of
localhost just in case we were having DNS issues. Still slow. We also
tried using curl instead of file_get_contents, no change. I thought it
was my server so I bought a new dual xeon/raid0 scsi/8 gigs of ram and
no change (that was a bit disappointing :) ).
I suspect that something is timing out when we interface between the two
languages but no idea what. Does anyone have any suggestions on where
to diagnose next? Has anyone had success in calling tomcat from php
without delays?
Thanks for any help.
-glenn