~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_xml.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-16 23:38:03 UTC
  • mto: This revision was merged to the branch mainline in revision 1942.
  • Revision ID: john@arbash-meinel.com-20060816233803-9c192384559be0fa
Caching revision_ids costs us a little (512 vs 475), but caching file-ids costs us a lot (780 vs 512), so disabling caching of file ids for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        inv = self.make_kernel_like_inventory()
69
69
        as_str = xml5.serializer_v5.write_inventory_to_string(inv)
70
70
 
 
71
        cache_utf8.clear_encoding_cache()
71
72
        read_inv = self.time(xml5.serializer_v5.read_inventory_from_string,
72
73
                             as_str)
73
74
        # TODO: make sure the final inventory is equal as a sanity check
74
75
 
75
 
    def test_read_from_string_no_cache_kernel_like_inventory(self):
 
76
    def test_read_from_string_cached_kernel_like_inventory(self):
 
77
        cache_utf8.clear_encoding_cache()
76
78
        inv = self.make_kernel_like_inventory()
77
79
        as_str = xml5.serializer_v5.write_inventory_to_string(inv)
78
80
 
79
 
        xml5._clear_cache()
80
 
        cache_utf8.clear_encoding_cache()
 
81
        xml5.serializer_v5.read_inventory_from_string(as_str)
 
82
 
81
83
        read_inv = self.time(xml5.serializer_v5.read_inventory_from_string,
82
84
                             as_str)
83
85
        # TODO: make sure the final inventory is equal as a sanity check
84