[Python-Dev] Re: [Python-checkins] python/dist/src/Python
compile.c, 2.311, 2.312
Guido van Rossum
guido at python.org
Tue Aug 3 18:23:44 CEST 2004
> > Aha! So maybe we should reconsider whether mwh's removal of the
> > filename interning in the compiler should be reverted.
>
> I just looked at the sizes of the four largest .pyc files wrt. to this
> change (ie. the one generated before 2.312, and the one generated
> after):
>
> before after
> pydoc 84711 91263
> cookielib 57353 57353
> pickletools 55862 57038
> tarfile 54074 58974
Are you sure the cookielib numbers are correct? They show no
difference, which would only make sense if there was only a single
code object.
> So the patch does cause a size increase (and likely also a slowdown
> because of the extra memory allocations at startup). Whether this is
> relevant or not, I don't know.
Based on this data I'd like to see the change reverted; the motivation
for the change was debuggability of leaks, not a real problem with the
changed code.
> I think I would prefer if a different mechanism was found to account
> for the change in references during an import, e.g. by taking the
> number of interned strings before and after the import operation.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list