michaeljiang
Programmer
I have a class moduel A.pm, a non-class module B.pm and a console file C.pl.
This is relationship of these 3:
C.pl "use B;"
B.pm "use A;" and "new A();"
In "new" of A.pm, I have some codes to read a file for about 240000 lines.
But it took extremely long time ( more than 5 minutes!) for A.pm to finish reading those 240000 lines in "new".
I tested to just "new A()" from command line and from a simple perl file that only does this. It finishes in a second.
I'm confused and "perl -d" didn't help much to tell why it takes long time. "perl -dProf" and "dprofpp" did show that the "new" subroutine takes long time and it also shows: "Exporter::as_heavy" and "DynaLoader::BEGIN"(which I didn't explicitly call in my program at all). But I cannot find a clue what might be the cause.
Any thoughts?
Thanks!
This is relationship of these 3:
C.pl "use B;"
B.pm "use A;" and "new A();"
In "new" of A.pm, I have some codes to read a file for about 240000 lines.
But it took extremely long time ( more than 5 minutes!) for A.pm to finish reading those 240000 lines in "new".
I tested to just "new A()" from command line and from a simple perl file that only does this. It finishes in a second.
I'm confused and "perl -d" didn't help much to tell why it takes long time. "perl -dProf" and "dprofpp" did show that the "new" subroutine takes long time and it also shows: "Exporter::as_heavy" and "DynaLoader::BEGIN"(which I didn't explicitly call in my program at all). But I cannot find a clue what might be the cause.
Any thoughts?
Thanks!