On 4 August 2014 16:14, Daniel Pyrathon <[email protected]> wrote: > Hi All, > > This has been resolved by using the ImmutableList datastructure > > https://github.com/PirosB3/django/blob/soc2014_meta_refactor_upgrade_flags_get_field_tree/django/db/models/options.py#L629 >
But why? What's the benefit over using a tuple? ImmutableList is not even a list, because it inherits from tuple. The only other use of this data structure I could find is in upload handlers and the rationale is that the field suddenly changes from mutable to immutable. I don't think your case is the same, as fields are always immutable. Also, if fields() is immutable, then so should concrete_fields(), etc. > > On Monday, August 4, 2014 2:44:38 PM UTC+2, Collin Anderson wrote: >> >> if we do really need a list, could we gain some performance by caching >> tuples and converting them to lists instead of caching lists? > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/f4795467-24c7-4a61-af78-1a5b1a16299d%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- Łukasz Rekucki -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAEZs-E%2BPeTGXnQSuQPqqYiOC1zmNd8ZuweoOWm4rASwi14WFdA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
