зеркало из https://github.com/microsoft/git.git
gitview: Define __slots__ for Commit
Define __slots__ for the Commit class. This reserves space in each Commit object for only the defined variables. On my system this reduces heap usage when viewing a kernel repo by 12% ~= 55868 KB. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
709b148a90
Коммит
225696af2c
|
@ -263,6 +263,9 @@ class Commit(object):
|
|||
""" This represent a commit object obtained after parsing the git-rev-list
|
||||
output """
|
||||
|
||||
__slots__ = ['children_sha1', 'message', 'author', 'date', 'committer',
|
||||
'commit_date', 'commit_sha1', 'parent_sha1']
|
||||
|
||||
children_sha1 = {}
|
||||
|
||||
def __init__(self, commit_lines):
|
||||
|
|
Загрузка…
Ссылка в новой задаче