Added a yield occasionaly in main
svn: r14083
This commit is contained in:
parent
f446b66e34
commit
943dbc97b4
@ -87,9 +87,10 @@ class AgeStatsGramplet(Gramplet):
|
|||||||
mother_handles = [[] for age in range(self.max_mother_diff)]
|
mother_handles = [[] for age in range(self.max_mother_diff)]
|
||||||
father_handles = [[] for age in range(self.max_father_diff)]
|
father_handles = [[] for age in range(self.max_father_diff)]
|
||||||
text = ""
|
text = ""
|
||||||
|
count = 0
|
||||||
for p in self.dbstate.db.iter_people():
|
for p in self.dbstate.db.iter_people():
|
||||||
yield True
|
if count % 300 == 0:
|
||||||
|
yield True
|
||||||
# if birth_date and death_date, compute age
|
# if birth_date and death_date, compute age
|
||||||
birth_ref = p.get_birth_ref()
|
birth_ref = p.get_birth_ref()
|
||||||
birth_date = None
|
birth_date = None
|
||||||
@ -158,6 +159,7 @@ class AgeStatsGramplet(Gramplet):
|
|||||||
# print "Mother diff out of range: %d for %s" % (diff,
|
# print "Mother diff out of range: %d for %s" % (diff,
|
||||||
# p.get_primary_name().get_first_name()
|
# p.get_primary_name().get_first_name()
|
||||||
# + " " + p.get_primary_name().get_surname())
|
# + " " + p.get_primary_name().get_surname())
|
||||||
|
count += 1
|
||||||
width = self.chart_width
|
width = self.chart_width
|
||||||
graph_width = width - 8
|
graph_width = width - 8
|
||||||
self.create_bargraph(age_dict, age_handles, _("Lifespan Age Distribution"), _("Age"), graph_width, 5, self.max_age)
|
self.create_bargraph(age_dict, age_handles, _("Lifespan Age Distribution"), _("Age"), graph_width, 5, self.max_age)
|
||||||
|
Loading…
Reference in New Issue
Block a user