~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/xml8.py

  • Committer: John Arbash Meinel
  • Date: 2008-12-10 18:50:59 UTC
  • mto: This revision was merged to the branch mainline in revision 3912.
  • Revision ID: john@arbash-meinel.com-20081210185059-hfucbbmumvmes1ql
Add detailed timings on the last 100 mysql revisions.

Revert to the 'safe' copy-everything code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
365
365
        file_id = elt_get('file_id')
366
366
        revision = elt_get('revision')
367
367
        # Check and see if we have already unpacked this exact entry
368
 
        # Some timings for "repo.revision_trees(last_100_bzr_revs)"
369
 
        #   unmodified  4.1s
 
368
        # Some timings for "repo.revision_trees(last_100_revs)"
 
369
        #               bzr     mysql
 
370
        #   unmodified  4.1s    40.8s
370
371
        #   using lru   3.5s
371
 
        #   using fifo  2.83s
 
372
        #   using fifo  2.83s   29.1s
372
373
        #   lru._cache  2.8s
373
 
        #   dict        2.75s
 
374
        #   dict        2.75s   26.8s
 
375
        #   inv.add     2.5s    26.0s
 
376
        #   no_copy     2.00s   20.5s
 
377
        #   no_c,dict   1.95s   18.0s
374
378
        # Note that a cache of 10k nodes is more than sufficient to hold all of
375
379
        # the inventory for the last 100 revs.
376
380
        #   With inventory.add() optimizations, and not copying file entries,
383
387
            pass
384
388
        else:
385
389
            # Only copying directory entries drops us 2.85s => 2.35s
386
 
            if cached_ie.kind == 'directory':
387
 
                return cached_ie.copy()
388
 
            return cached_ie
389
 
            # return cached_ie.copy()
 
390
            # if cached_ie.kind == 'directory':
 
391
            #     return cached_ie.copy()
 
392
            # return cached_ie
 
393
            return cached_ie.copy()
390
394
 
391
395
        kind = elt.tag
392
396
        if not InventoryEntry.versionable_kind(kind):