[Madrid-pm] Ran out of memory usando Twig

Francisco Rivas franciscojrivash en gmail.com
Vie Abr 29 06:05:12 PDT 2011


Perl 5.10.1
Version: 1:3.32-3ubuntu

He visto un par de cosas.

http://www.issociate.de/board/post/491936/Perl_%22Out_of_Memory!%22_Issue.html
http://www.perlmonks.org/index.pl?node_id=491939

No he terminado de leerlos

2011/4/29 deibyz <deibyz at gmail.com>

> Pues no parece muy lógico entonces... Igual busca a ver si hay algún bug
> para tu versión de XML::Twig o algo parecido, qué versión de Perl y de
> XML::Twig estás usando?
>
>
>
> 2011/4/29 Francisco Rivas <franciscojrivash at gmail.com>
>
>> Hola :D
>>
>> Son 48 archivos de entre 72 y 80 lineas cada uno. El hardware es un
>> portatil Dell Latitude E6410 con 2gb de RAM en un i5. Ubuntu 10.04.
>>
>> Gracias :D
>>
>> 2011/4/29 deibyz <deibyz at gmail.com>
>>
>>> Cómo de grande es tu XML, y en qué HW estás ejecutando el script?
>>>
>>> Salu2,
>>> D.
>>>
>>> On Fri, Apr 29, 2011 at 2:33 PM, Francisco Rivas <
>>> franciscojrivash at gmail.com> wrote:
>>>
>>>> Hola de nuevo,
>>>>
>>>> Luego de haber corregido los errores sintacticos, gracias de nuevo
>>>> Rafael, estoy probando el script y esta fallando :
>>>>
>>>> $ perl modify_xml.pl
>>>> Working on ./BAAHeatWidget_15022011_update/BAAHeatWidget_asset.xml
>>>> Working on ./BloomberWidget_09022011/BloomberWidget_asset.xml
>>>> Working on ./BloomberWidget_11022011_update/BloomberWidget_asset.xml
>>>> Working on ./BookatableWid_09022011/BookatableWid_asset.xml
>>>> Ran out of memory for input buffer at /usr/lib/perl5/XML/Parser/Expat.pm
>>>> line 469.
>>>>  at modify_xml.pl line 18
>>>>  at modify_xml.pl line 18
>>>>
>>>> Linea 18 : my $t = XML::Twig->new(pretty_print =>
>>>> 'indented')->parsefile($file);
>>>>
>>>> Esta linea esta dentro de un foreach loop, dentro de un sub que recibe
>>>> como parametro un array con todos los nombres de los archivos que quiero
>>>> modificar :
>>>>
>>>> sub modify_xml {
>>>>   foreach my $file(@files) {
>>>>     print "Working on ".$file."\n";
>>>>     my $t = XML::Twig->new(pretty_print =>
>>>> 'indented')->parsefile($file);
>>>>
>>>>     my $root = $t->root;
>>>> ....
>>>> }
>>>>
>>>> find(sub { push (@files, $File::Find::name) if -f and /\.xml$/}, at dirs);
>>>> &modify_xml(@files);
>>>>
>>>> Gracias de nuevo, de antemano :D
>>>>
>>>> _______________________________________________
>>>> Madrid-pm mailing list
>>>> Madrid-pm at pm.org
>>>> http://mail.pm.org/mailman/listinfo/madrid-pm
>>>>
>>>
>>>
>>> _______________________________________________
>>> Madrid-pm mailing list
>>> Madrid-pm at pm.org
>>> http://mail.pm.org/mailman/listinfo/madrid-pm
>>>
>>
>>
>> _______________________________________________
>> Madrid-pm mailing list
>> Madrid-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/madrid-pm
>>
>
>
> _______________________________________________
> Madrid-pm mailing list
> Madrid-pm at pm.org
> http://mail.pm.org/mailman/listinfo/madrid-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/madrid-pm/attachments/20110429/000047a8/attachment.html>


Más información sobre la lista de distribución Madrid-pm