equal
deleted
inserted
replaced
287 |
287 |
288 while sliceme and 0 < needed: |
288 while sliceme and 0 < needed: |
289 _key, target = heappop(sliceme) |
289 _key, target = heappop(sliceme) |
290 for new in subranges(local, target): |
290 for new in subranges(local, target): |
291 # XXX we could record hierarchy to optimise drop |
291 # XXX we could record hierarchy to optimise drop |
292 if addentry(entry): |
292 if addentry(new): |
293 if 1 < len(entry): |
293 if 1 < len(new): |
294 heappush(sliceme, (-rangelength(local, entry), entry)) |
294 heappush(sliceme, (-rangelength(local, new), new)) |
295 needed -= 1 |
295 needed -= 1 |
296 if needed <= 0: |
296 if needed <= 0: |
297 break |
297 break |
298 |
298 |
299 # no longer the first interation |
299 # no longer the first interation |