eberle1080/dulwich-py3k — comment on commit 6ac57123389a73e3fa1da4ac9a15c0d223dc8b3b
File:  line 0
By jelmer:

My point is that it adds a lot more code to the C implementation (and thus extra maintaince overhead and increased risks of memory leaks/segfaults) without much benefit. I don't think having the Python implementation as a generator (rather than a list) is particularly useful either, but it doesn't really make things more complex either.

With the way parse_tree is being used memory already scales with the number of entries in the tree object - we put the data into a dictionary. A much simpler fix would be to have parse_tree return a dictionary - that way we don't have to create the list with the entries, but we also save the list comprehension in the Python code.