Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Do I need to use Coro instead of threads/forks

by mohan2monks (Beadle)
on Sep 29, 2014 at 13:14 UTC ( [id://1102352]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Do I need to use Coro instead of threads/forks
in thread Do I need to use Coro instead of threads/forks

I have created a test where i removed vendors and put in Coros instead of threads both in main and worker threads.
The script works fine even on actual data (tried with only two vendors i.e. 2 main threads and thread 1 opening 2 more inside it).
I am observing time taken to complete output and have not seen any improvement so far.
Further testing needs to be done to see if it is fetching data in parallel.
In 3 iterations it took 12 to 17 sec to finish.
With OS threads it should be around 10 to 12 sec. (need to confirm)

  • Comment on Re^4: Do I need to use Coro instead of threads/forks

Replies are listed 'Best First'.
Re^5: Do I need to use Coro instead of threads/forks
by Corion (Patriarch) on Sep 29, 2014 at 13:21 UTC

    Note that you cannot present all data until the last vendor has replied.

    If you want to present information as it becomes available, you will need to add Javascript code on the browser side to read the information as it becomes available and progressively display the information to the user.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1102352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-25 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found