[Israel.pm] use and require

Gaal Yahas gaal at forum2.org
Sun Mar 20 03:11:12 PDT 2011

But it's not as quick.

$ time perl -e1
real 0m0.037s

$ echo 2 | sudo tee /proc/sys/vm/drop_caches

$ time perl -MPPIx::EditorTools::RenameVariable
-MPPIx::EditorTools::FindVariableDeclaration -e1
real 0m0.400s

Parsing Perl is not free.

On Sun, Mar 20, 2011 at 12:03 PM, Shmuel Fomberg <owner at semuel.co.il> wrote:

> >> In the case of an editor, I would expect it to load a minimum on
> >> startup, but then load silently all the other features, so the user
> >> won't need to wait when he needs them.
> >> And there, in the code that loads the features, there should be all the
> >> requires.
> > Shall we load all these modules and take up memory
> > space even if the user never uses any of the features?
> Yes.
> Come on, memory is cheap. if you sit and worry about it, you waste effort.
> load everything silently, and let the user feel quick response.
> Shmuel.
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl

Gaal Yahas <gaal at forum2.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20110320/1aa70b48/attachment.htm 

More information about the Perl mailing list