~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to notes/performance.txt

add a clean target

Show diffs side-by-side

added added

removed removed

Lines of Context:
218
218
bzr status  5.23s user 0.42s system 97% cpu 5.780 total
219
219
 
220
220
which is mostly opening, stating and reading files, as it should be.
221
 
Still a few too many stat calls.
 
 
b'\\ No newline at end of file'
 
221
Still a few too many stat calls.
 
222
 
 
223
Now fixed up handling of root directory.
 
224
 
 
225
Without flushing everything to disk as it goes into the store:
 
226
 
 
227
mbp@hope% bzr commit -m 'import linux 2.4.19'
 
228
bzr commit -m 'import linux 2.4.19'  8.15s user 2.09s system 53% cpu 19.295 total
 
229
 
 
230
mbp@hope% time bzr diff
 
231
bzr diff  5.80s user 0.52s system 69% cpu 9.128 total
 
232
mbp@hope% time bzr status
 
233
bzr status  5.64s user 0.43s system 68% cpu 8.848 total
 
234
 
 
235
patch -p1 < ../linux.pkg/patch-2.4.20  1.67s user 0.96s system 90% cpu 2.905 total
 
236
 
 
237
The diff changes 3462 files according to diffstat.
 
238
 
 
239
branch format: Bazaar-NG branch, format 0.0.4
 
240
 
 
241
in the working tree:
 
242
   8674 unchanged
 
243
   2463 modified
 
244
    818 added
 
245
    229 removed
 
246
      0 renamed
 
247
      0 unknown
 
248
      4 ignored
 
249
    614 versioned subdirectories
 
250
 
 
251
That is, 3510 entries have changed, but there are 48 changed
 
252
directories so the count is exactly right!
 
253
 
 
254
bzr commit -v -m 'import 2.4.20'  8.23s user 1.09s system 48% cpu 19.411 total
 
255
 
 
256
Kind of strange that this takes as much time as committing the whole
 
257
thing; I suppose it has to read every file.  
 
258
 
 
259
This shows many files as being renamed; I don't know why that would
 
260
be.
 
261
 
 
262
 
 
263
Patch to 2.4.21:
 
264
 
 
265
 2969 files changed, 366643 insertions(+), 147759 deletions(-)
 
266
 
 
267
After auto-add:
 
268
 
 
269
 2969 files changed, 372168 insertions(+), 153284 deletions(-)
 
270
 
 
271
I wonder why it is not exactly the same?  Maybe because the python
 
272
diff algorithm is a bit differnt to GNU diff.
 
273
 
 
274
----
 
275
 
 
276
2005-03-29  
 
277
 
 
278
full check, retrieving all file texts once for the 2.4 kernel branch
 
279
takes 10m elapsed, 1m cpu time.  lots of random IO and seeking.
 
280
 
 
281
----
 
282
 
 
283
 
 
284
mbp@hope% time python =bzr deleted --show-ids 
 
285
README                                             README-fa1d8447b4fd0140-adbf4342752f0fc3
 
286
python =bzr deleted --show-ids  1.55s user 0.09s system 96% cpu 1.701 total
 
287
mbp@hope% time python -O =bzr deleted --show-ids 
 
288
README                                             README-fa1d8447b4fd0140-adbf4342752f0fc3
 
289
python -O =bzr deleted --show-ids  1.47s user 0.10s system 101% cpu 1.547 total
 
290
mbp@hope% time python -O =bzr deleted --show-ids
 
291
README                                             README-fa1d8447b4fd0140-adbf4342752f0fc3
 
292
python -O =bzr deleted --show-ids  1.49s user 0.07s system 99% cpu 1.565 total
 
293
mbp@hope% time python =bzr deleted --show-ids   
 
294
README                                             README-fa1d8447b4fd0140-adbf4342752f0fc3
 
295
python =bzr deleted --show-ids  1.55s user 0.08s system 99% cpu 1.637 total
 
296
 
 
297
small but significant improvement from Python -O
 
298
 
 
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.
 
313
 
 
314
 
 
315
as of r148
 
316
 
 
317
bzr deleted  1.46s user 0.08s system 98% cpu 1.561 total
 
318
 
 
319
 
 
320
Alternatively maybe keep an id2path and path2id cache?  Keeping it
 
321
coherent may be hard...