~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to notes/performance.txt

  • Committer: mbp at sourcefrog
  • Date: 2005-03-29 11:49:50 UTC
  • Revision ID: mbp@sourcefrog.net-20050329114950-c6c9ab8bd5ab72c0
performance notes and measurements

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
 
297
297
small but significant improvement from Python -O
298
298
 
299
 
 
300
 
 
 
299
----
 
300
 
 
301
Loading a large inventory through cElementTree is pretty quick; only
 
302
about 0.117s.  By contrast reading the inventory into our data
 
303
structure takes about 0.7s.  
 
304
 
 
305
So I think the problem must be in converting everything to
 
306
InventoryEntries and back again every time.
 
307
 
 
308
Thought about that way it seems pretty inefficient: why create all
 
309
those objects when most of them aren't called on most invocations?
 
310
Instead perhaps the Inventory object should hold the ElementTree and
 
311
pull things out of it only as necessary?  We can even have an index
 
312
pointing into the ElementTree by id, path, etc.