Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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?  :-)


In reply to Re^2: multi threading DBI by marinersk
in thread multi threading DBI by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    [marto]: Corion, not bringing the kids would make it ideal :P
    [marto]: a suggestion, have one project in the list that isn't programming/perl related
    [Corion]: marto: Yeah, things are more parent-friendly the way they are ;))
    [marto]: some hardware/makey thing
    [Corion]: marto: Ah, I'm currently drifting to that again, over"painting" (well with Inkscape) one of my photographs and thinking about vectorizing some other images ...
    [marto]: Corion, yes something 'artistic', so that or some music. Even combine some things, build a musical instrument :)
    [Corion]: marto: Naah, I'm avoiding that rabbit hole ;) Sometimes I think of using Perl to create MIDI to generate music, or at least the harmonies to which I could jam, but then that would eat even more into available time ;-))

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2017-07-27 07:47 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      I came, I saw, I ...
























      Results (404 votes). Check out past polls.