Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Improving SQL speed

by Mad_Mac (Beadle)
on Nov 02, 2009 at 18:57 UTC ( [id://804543]=note: print w/replies, xml ) Need Help??


in reply to Re: Improving SQL speed
in thread Improving SQL speed

OK, so I worked through your suggestions:

  • Thanks
  • Got it. I was trying to be explicit in the debugging phase, but now that it's working I changed it per your suggestion.
  • OK. I had them declared early on becuase I thought I was getting an error declaring them within the sub-function, but apparently not. I changed them as you recommended and it works fine.
  • Thanks! Can the same trick be used on if (exists $mp3->{ID3v1}) {?
  • Yea, Part of that is because I kept changing the way I wanted to use those variables as my code evolved ... part of it's because I've only been working in Perl again for a few weeks after a 10+ year hiatus, and part of it's becuase I occasionally get warnings from Perl that calling certain array variables like @songinfo[0] would be better referenced as $songinfo[0]. Which makes me think I don't really understand Perl variables yet. So I just keep mucking with it (and plagiarizing other peoples code) 'till it does what I want.
  • After making the changes you suggested, the code seems to be ~10% faster, but I'm not sure. I'm going to add a timer and run it the old way and with your changes. We'll see.

    Thanks again for your suggestions.

    Mad Mac

    Replies are listed 'Best First'.
    Re^3: Improving SQL speed
    by MidLifeXis (Monsignor) on Nov 02, 2009 at 21:03 UTC

      Any speed improvement is unintentional. My suggestions were purely for maintenance and readability (speaking Perl, in effect). If it is faster, I take cookies ;-)

      --MidLifeXis

    Log In?
    Username:
    Password:

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

    How do I use this?Last hourOther CB clients
    Other Users?
    Others examining the Monastery: (4)
    As of 2024-04-20 04:05 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found