Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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


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?


fmerges at
  • Comment on Re: Needed Performance improvement in reading and fetching from a file

Replies are listed 'Best First'.
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


        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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://715917]
[Corion]: If all else fails, Spreadsheet::XLSX should be "installable" by manually copying the files, provided that the prerequisites are met
[thezip]: It fails in the "formatted 2-digit numeric" tests
[thezip]: Okay Corion, that's what I wanted to hear. Thanks!
[Corion]: Oh, a test failure... Just force-install it then? --force and potentially --notest to skip the tests alltogether ?
[ambrus]: thezip: is Activestate Perl usable for your scenario instead?
[MidLifeXis]: Yeah, --notest is good, not sure I would do --force.
[thezip]: It fails 2/10 tests in that group. What are the ramifications if I force it? What should I look for for?
[thezip]: I've migrated from ActiveState to Strawberry. No going back...
[thezip]: I'll try the --notest arg first when I get back from meetings (after lunch).
[thezip]: Thanks guys for your comments! :-)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2017-03-23 17:18 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (290 votes). Check out past polls.