Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Does Data::Dumper have a memory leak?

by dragonchild (Archbishop)
on Sep 07, 2001 at 19:48 UTC ( [id://110920]=perlquestion: print w/replies, xml ) Need Help??

dragonchild has asked for the wisdom of the Perl Monks concerning the following question:

I know this has been discussed before, but I have no clue how to get SuperSearch to do what I want. *hangs head in shame*

Does Data::Dumper have a memory leak when working with huge amounts of potentially self-referential data?

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Does Data::Dumper have a memory leak?
by demerphq (Chancellor) on Sep 07, 2001 at 20:25 UTC
    Are you using AcitveState?

    I have the same problem with Data::Dumper for very large structures but not self referential.

    For some reason $Data::Dumper::Useqq=1; sorted the problem out totally. Of course it loses the speed of the C implementation AFAIK, but it works at least...

    Yves
    --
    You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)

Re: Does Data::Dumper have a memory leak?
by synapse0 (Pilgrim) on Sep 07, 2001 at 20:02 UTC
    Could this node be the one you're referring to? I queried '"data::dumper" memory' in supersearch and got some relavent nodes..
    -Syn0
Re: Does Data::Dumper have a memory leak?
by jplindstrom (Monsignor) on Sep 07, 2001 at 20:39 UTC
    Not knowing anything about the internals of Data::Dumper, I don't tink the problem is a memory leak; it is a problem of memory not being garbage collecteds fast enough.

    In Windows, when I dump a particular 170K data structure the process baloons to 150M and stays there. But when I minimize the DOS window, the memory consumption for the process goes down to normal levels again (as displayed in the Task Manager).

    This behaviour forced me to reluctantly replace Data::Dumper with Storable :(

    /J

      You were reluctant about moving to Storable? Why? It's faster and is generally considered a better solution on the mailing lists I frequent.
        In this case I cared for the human-readable aspect of the output.

        Being able to edit saved text files is a nice feature in many cases.

        /J

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-24 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found