Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: multi threading DBI

by marinersk (Chaplain)
on Oct 30, 2013 at 00:19 UTC ( #1060247=note: print w/ replies, xml ) Need Help??


in reply to Re: multi threading DBI
in thread multi threading DBI

Frankly, absent profiling tools, I think testing both solutions has merit.

With profiling tools, the answer will likely become obviously with little to no core code change.

And were I a betting man, I'd say both solutions are likely to produce improvements, with a smaller bet that multithreading would likely yield a greater gain in the scrapes/minute category. Improving the back end (DB updates/minute) can only be a good thing, so I am inclined to favor doing both in any regard.

But the multi-threading scraper into a queue with a single-threaded DBI operation sounds like the more fun engineering exercise (and I admit this should be an irrelevant attribute in the decision making process but I had to throw it out there).

Encapsulating DB updates in transactions is almost no development effort at all (and highlights that it should probably be done anyway).

How's that for sitting on the fence?  :-)


Comment on Re^2: multi threading DBI
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2014-10-22 00:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls