Code review comment for lp:~bialix/bzr/2.4-bug-967060

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

> Martin Packman пишет:
> > How about using properties returning 0 instead? This isn't a class designed
> for minimising memory usage, but as these values serve no purpose there seems
> no point storing them.
>
> Well, thinking about it more I'd like to avoid properties because they
> mean more code for no real benefit. To avoid duplication in explicit
> initialization of those 4 members to zero, I'd prefer move them into
> constructor (__init__ method). There is no constructor today, but we can
> add it.
Presumably the benefit in using a property would mean 4 fields less to store in memory per instance, and less time to spend assigning those member variables per stat object. I'm not sure how big the gains of that are in practice though.

I don't think that sort of change should be a requirement for this fix to land. But if you feel like fixing that, it would be great. :)

« Back to merge proposal