Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^2: multi threading DBI

by marinersk (Curate)
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2016-10-27 15:38 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (366 votes). Check out past polls.