summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 008bb6e)
raw | patch | inline | side by side (parent: 008bb6e)
author | Fredrik Kuivinen <freku045@student.liu.se> | |
Thu, 2 Feb 2006 11:43:35 +0000 (12:43 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 2 Feb 2006 20:30:51 +0000 (12:30 -0800) |
Use __slots__ to speed up construction and decrease memory consumption
of the Commit objects.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
of the Commit objects.
Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitMergeCommon.py | patch | blob | history |
diff --git a/gitMergeCommon.py b/gitMergeCommon.py
index ff6f58a07c8f46563d34876a70449d79d527300c..fdbf9e4778fd7d44667e475ba659d64986b2e097 100644 (file)
--- a/gitMergeCommon.py
+++ b/gitMergeCommon.py
return (type(obj) is str and bool(shaRE.match(obj))) or \
(type(obj) is int and obj >= 1)
-class Commit:
+class Commit(object):
+ __slots__ = ['parents', 'firstLineMsg', 'children', '_tree', 'sha',
+ 'virtual']
+
def __init__(self, sha, parents, tree=None):
self.parents = parents
self.firstLineMsg = None