Calling the query in tomcat takes like a second. Tomcat retrieves the results in a second or two. BUt it takes 5-10 seconds from the time Tomcat actually serves the query to the time the php function retrieves the results.
I'm strongly suspecting something unrelated to nutch, and perhaps even tomcat or php, that's server level that's causing the delay (which is why we tried changing the localhost to 127.0.0.1). We'll try both the library you've suggested and the other suggestion as well to see if it makes any difference - thanks for the input. Regards, Glenn > I've used Magpie rss library in PHP with great success > to do fast parsing of the OpenSearch XML data. > > How long are your opensearch queries taking without > going through PHP to return results? > > -byron > > --- "Insurance Squared Inc." > <[EMAIL PROTECTED]> wrote: > >> 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. >> >> >
