http://www.perlmonks.org?node_id=823630


in reply to LWP::UserAgent lengthy download

. If I restrict the search to a small number of results the delay is manageable. However the more items the more lengthy the delay.

If you can restrict the search, can you not split the required search into several restricted searches and do them serially? That'd allow you to display the intermediate results as you get them, and so reduce the pregnant pause up front. Possibly at the cost of taking slightly longer overall.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: LWP::UserAgent lengthy download
by jonnyfolk (Vicar) on Feb 17, 2010 at 08:18 UTC

    That's an interesting idea, thank you. How would you display further results? One way might be to print the first split to screen, and the rest to a file, putting a link on the screen results. Did you have something else in mind?

      I assume from your question that you are representing the data you're fetching with LWP to a browser.

      I've made substantial use of LWP, but done very little with cgi, so I'm not the right person to answer that question.

      I have vague memories of something called multi-part data--and wikipedia kicks up this which may be related--but I know little about it.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.