~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tuned_gzip.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-17 13:25:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1937.
  • Revision ID: john@arbash-meinel.com-20060817132505-af5d2c9ef197c388
comment on tuned_gzip.readlines() functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
        # to :
282
282
        # 4168 calls in 417.
283
283
        # Negative numbers result in reading all the lines
 
284
        
 
285
        # python's gzip routine uses sizehint. This is a more efficient way
 
286
        # than python uses to honor it. But it is even more efficient to
 
287
        # just read the entire thing and use cStringIO to split into lines.
 
288
        # if sizehint <= 0:
 
289
        #     sizehint = -1
 
290
        # content = self.read(sizehint)
 
291
        # return bzrlib.osutils.split_lines(content)
284
292
        content = StringIO(self.read(-1))
285
293
        return content.readlines()
286
294