in reply to Re^2: lazy loading and memory usage
in thread lazy loading and memory usage

At the end of day, does this memory optimization within a for() loop matter at all? I think that it usually does not.

...

I would not worry until there are thousands of new objects being created. A few hundred? => no.

Discussion of the number of genes, and whether hundreds or thousands constitutes a number worth concerning about is premature and assumptive until you know how big each gene is!

Given that:

  1. individual genes can be millions of characters in length--and that's when stored in raw string form without any structuring or associated meta data.
  2. And that the warning the OP is asking about comes from the authors of the module in question who presumably know far more about its internals than we are party to.

In general, worrying about such an optimisation might be unnecessary, but this warning is not a general warning, but rather a very specific warning about a very particular library, from the people that wrote that library and who therefore are best placed to know.

I think it would be best to heed such warnings.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.