Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

array high memory using

by subbus02 (Novice)
on Mar 07, 2013 at 07:25 UTC ( #1022159=perlquestion: print w/ replies, xml ) Need Help??
subbus02 has asked for the wisdom of the Perl Monks concerning the following question:

When i compare the values and stored in an array at this point memory usage is very high, could you tell how to control the memory usage.

if(Length2_LWW::Length($pre_str[$count],\@arr)<=Length2_LWW::Length($p +ost_str[$count],\@arr)){ $text_dum_col[$col][$count]=$post_str[$count]; } else { $text_dum_col[$col][$count]=$pre_str[$count]; }

Comment on array high memory using
Download Code
Re: array high memory using
by tmharish (Friar) on Mar 07, 2013 at 07:29 UTC

    Please note that the section "Perl Monks Discussion" is " only for discussing issues pertaining to the PerlMonks web site."

    Please use the section Seekers of Perl Wisdom for "question on how to do something in Perl, or you need a Perl solution to an actual real-life problem, or you're unsure why something you've tried just isn't working..."

    I have moved this to SoPW.

Re: array high memory using
by LanX (Canon) on Mar 07, 2013 at 08:02 UTC
    I would ask the maintainer of this obscure Length2_LWW package. :)

    Cheers Rolf

      Other functions also used Length2_LWW that are taking less memory.

        Sorry, it's impossible to help you with the sparse information you're providing.

        Cheers Rolf

Re: array high memory using
by CountZero (Bishop) on Mar 07, 2013 at 11:11 UTC
    The answer is 42. As always. Really!

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re: array high memory using
by Anonymous Monk on Mar 07, 2013 at 14:25 UTC
    Just keep futzing around with it for another six months or so, until your employer's client realizes that someone who doesn't know what he's doing is not cheaper than someone who does. No one can look at a single statement in a program and somehow divine why it's using a lot of memory. Nor is anyone going to be willing to take the entire program (should you respond to this comment, as so many do, by dumping it all into a reply and saying "fix it for me") and fix it for you.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2014-10-26 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (150 votes), past polls