Added a yield occasionaly in main
svn: r14083
This commit is contained in:
parent
f446b66e34
commit
943dbc97b4
@ -87,8 +87,9 @@ class AgeStatsGramplet(Gramplet):
|
||||
mother_handles = [[] for age in range(self.max_mother_diff)]
|
||||
father_handles = [[] for age in range(self.max_father_diff)]
|
||||
text = ""
|
||||
|
||||
count = 0
|
||||
for p in self.dbstate.db.iter_people():
|
||||
if count % 300 == 0:
|
||||
yield True
|
||||
# if birth_date and death_date, compute age
|
||||
birth_ref = p.get_birth_ref()
|
||||
@ -158,6 +159,7 @@ class AgeStatsGramplet(Gramplet):
|
||||
# print "Mother diff out of range: %d for %s" % (diff,
|
||||
# p.get_primary_name().get_first_name()
|
||||
# + " " + p.get_primary_name().get_surname())
|
||||
count += 1
|
||||
width = self.chart_width
|
||||
graph_width = width - 8
|
||||
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