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

Re: Needed Performance improvement in reading and fetching from a file

by fmerges (Chaplain)
on Oct 08, 2008 at 05:44 UTC ( #715917=note: print w/ replies, xml ) Need Help??


in reply to Needed Performance improvement in reading and fetching from a file

Hi,

I agree with smiffy. Even just splitting up to the fields you need, would not make that much difference, pushing to an array and later going again over it for printing is superfluous; if you really need to get it these way from another part of the program, you can also think of using an iterator/closure.
And again, are you really sure it's this section that is taking all the time? have you used Devel::DProf or Benchmark::Stopwatch?

Regards,

fmerges at irc.freenode.net


Comment on Re: Needed Performance improvement in reading and fetching from a file
Re^2: Needed Performance improvement in reading and fetching from a file
by harishnuti (Beadle) on Oct 08, 2008 at 07:23 UTC

    i do have other blocks in the program , but not really sure to how to find performance, so i suspected this splitting operation.
    infact . my requirement is little bit complex.
    Based on second field fetched, i will do some comparisions which then might need all fields which i use for CSV conversion(to csv file) in later part. so its wise to get second field only initially (using Optimized split as said above) and then if needed i will further split down later.
    i will try to see if other parts of program are really hitting peformance
      "but not really sure to how to find performance"

      It sounds like you would benefit from benchmarking/profiling your code. See Debugging and Optimization from the tutorials section of this site, also worth looking at is the Devel::NYTProf module, which I mention here.

      Hope this helps

      Martin

        Thanks, i will go through the link, really helpfull, i know the issue now, but trying to find solution, have updated my question

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2014-12-18 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (44 votes), past polls