corpx has asked for the wisdom of the Perl Monks concerning the following question:
Every time it executes $te->parse($page), the memory used by the program increases. I know HTML::Tree has delete() to clear up the memory after using it, but how can I free up the memory used by TableExtract?#!/usr/bin/perl use WWW::Mechanize; use HTML::TableExtract qw(tree);; use strict; start(); sub start { my $te = HTML::TableExtract -> new( ); my $agent = WWW::Mechanize->new( stack_depth => 0); $agent-> agent_alias( 'Windows IE 6' ); $agent->get('http://www.perlmonks.org/?'); my $page = $agent->content; for (my $c =0 ; $c < 500; $c++) { $te->parse ($page); print "c is $c\n"; } } exit();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: HTML::TableExtract Memory Usage
by Corion (Patriarch) on Sep 02, 2010 at 19:51 UTC | |
by corpx (Acolyte) on Sep 02, 2010 at 21:19 UTC | |
|
Re: HTML::TableExtract Memory Usage
by Anonymous Monk on Sep 03, 2010 at 00:37 UTC | |
by Anonymous Monk on Sep 03, 2010 at 00:49 UTC | |
by Anonymous Monk on Sep 03, 2010 at 04:06 UTC | |
|
Re: HTML::TableExtract Memory Usage
by Anonymous Monk on Sep 04, 2010 at 14:30 UTC | |
|
Re: HTML::TableExtract Memory Usage
by Anonymous Monk on Sep 04, 2010 at 07:03 UTC | |
by Anonymous Monk on Sep 04, 2010 at 07:33 UTC |