Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re^2: multi threading DBI

by marinersk (Priest)
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?  :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1060247]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (10)
As of 2018-06-25 20:25 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (128 votes). Check out past polls.