On Tue, Jan 29, 2008 at 06:52:57PM -0000, Alexander Belchenko wrote: > | When a command is executed, bzr produces no output for a long period of > | time. In the task manager, I can see that bzr.exe CPU usage is near > | zero. The memory usage increases very slowly to about 10MB, and then > | suddenly the command begins execution with performance comparable to > | what I have seen on Windows XP boxes. > > So you think there is slow startup? That is correct. > | My working theory is that this is a manifestation of a Vista bug > that leads to extremely slow zip archive extraction: | > http://www.google.com/search?q=vista+zip+slow > > Actually we don't use built-in Vista support for extracting zip files. > bzr.exe is used builtin gzip library. I don't know though on which > system dll it depends. All rants about Vista unzip slowness related > to built-in Vista unzip. I want to note it again: we don't use > built-in unzip. bzr.exe has its own unzip inside. Actually, not all rants about Vista unzip slowness are related to built-in Vista unzip. I have seen complaints about WinZip, for example. I believe Python's zipimport uses zlib internally; maybe other problematic archival programs also use zlib. > That leads me to conclusion that Vista has some weird policy re > Program Files folder. May be some sort of security/viruses > protection. Also our bzr.exe does not use XP Manifest declaration. > May be we should finally add it. > > Paul, can you check my thoughts about Program Files policy by > reinstalling bzr.exe outside of Program Files in any other folder, > e.g. to C:\Bazaar\ and then check performance again. I installed to the user's desktop, and there was no difference in performance. > Also you could use my utility timeit[1] for measuring actual execution time. > (I recommend to use `bzr rocks` command for testing). > Use it in this manner: > > timeit bzr rocks 77.236 sec. (So, not quite as bad as two minutes, but it *feels* like it.) > I don't have Vista box around but may be on the next week I'll have the chance to > install and run bzr.exe on Vista notebook of my big boss. > > Also I'd like to see output of bzr import profiler. Just run any command > with global flag --profile-imports and then show us results. E.g.: > > bzr --profile-imports rocks I have attached this output. Paul C:\Program Files\BazaarStandalone\lib\library.zip\profile_imports.py:20: DeprecationWarning: The sre module is deprecated, please import re. cum inline name frame 28890.0 606.0 bzrlib @ __main__:64 12972.0 630.0 + [get_user_encoding]bzrlib.osutils @ bzrlib:19 5507.0 613.0 ++ [mutter]bzrlib.trace @ bzrlib.osutils:62 3049.0 605.0 +++ logging @ bzrlib.trace:54 618.0 618.0 ++++ atexit @ logging:1363 614.0 614.0 ++++ threading @ logging:38 609.0 609.0 ++++ string @ logging:29 603.0 603.0 ++++ traceback @ logging:29 1845.0 1239.0 +++ codecs @ bzrlib.trace:53 605.0 605.0 ++++ [aliases]encodings @ encodings:32 1.0 1.0 ++++ codecs @ encodings:31 3767.0 620.0 ++ [l] [win32utils]bzrlib @ bzrlib.osutils:319 1872.0 611.0 +++ ctypes @ bzrlib.win32utils:56 631.0 631.0 ++++ [Union, Structure, Array]_ctypes @ ctypes:10 629.0 629.0 ++++ [BigEndianStructure, LittleEndianS @ ctypes:516 1.0 1.0 ++++ [calcsize]struct @ ctypes:139 654.0 654.0 +++ win32file @ bzrlib.win32utils:68 621.0 621.0 +++ struct @ bzrlib.win32utils:23 1859.0 609.0 ++ [l] sha @ bzrlib.osutils:613 1250.0 609.0 +++ [sha1]hashlib @ sha:6 641.0 641.0 ++++ _hashlib @ hashlib:102 606.0 606.0 ++ [lazy_import]bzrlib.lazy_import @ bzrlib.osutils:26 603.0 603.0 ++ [symbol_versioning]bzrlib @ bzrlib.osutils:57 12882.0 612.0 + [l] [config]bzrlib @ bzrlib.plugin:60 12270.0 1844.0 ++ [l] [configobj]bzrlib.util.configo @ bzrlib.config:125 9804.0 624.0 +++ compiler @ bzrlib.util.configobj.configobj:29 5527.0 606.0 ++++ [compile, compileFile]compiler.pyc @ compiler:26 4288.0 1827.0 +++++ [pyassem, misc, future, symbols]co @ compiler.pycodegen:9 1213.0 607.0 ++++++ dis @ compiler.pyassem:3 606.0 606.0 +++++++ [*]opcode @ dis:6 627.0 627.0 ++++++ [misc]compiler @ compiler.pyassem:7 621.0 621.0 ++++++ new @ compiler.pyassem:4 633.0 633.0 +++++ [ast, parse, walk, syntax]compiler @ compiler.pycodegen:8 3047.0 617.0 ++++ [parse, parseFile]compiler.transfo @ compiler:24 1219.0 607.0 +++++ [*]compiler.ast @ compiler.transformer:28 612.0 612.0 ++++++ [CO_VARARGS, CO_VARKEYWORDS]compil @ compiler.ast:5 607.0 607.0 +++++ token @ compiler.transformer:31 604.0 604.0 +++++ symbol @ compiler.transformer:30 606.0 606.0 ++++ [walk]compiler.visitor @ compiler:25 621.0 621.0 +++ [generators]__future__ @ bzrlib.util.configobj.configobj:19 1.0 1.0 +++ [VdtMissingValue]validate @ bzrlib.util.configobj.configobj:92 611.0 611.0 + locale @ bzrlib.osutils:1355 608.0 608.0 + [l] [plugins]bzrlib @ bzrlib.plugin:107 607.0 607.0 + [*]encodings.cp1252 @ encodings:97 604.0 604.0 + bzrlib.plugin @ bzrlib:50 9132.0 609.0 bzrlib.commands @ __main__:96 8523.0 606.0 + [Option]bzrlib.option @ bzrlib.commands:56 5471.0 609.0 ++ [l] [log]bzrlib @ bzrlib.option:524 2429.0 609.0 +++ [NULL_REVISION]bzrlib.revision @ bzrlib.log:76 1213.0 607.0 ++++ [all_descendants, Graph, node_dist @ bzrlib.revision:25 606.0 606.0 +++++ [topo_sort]bzrlib.tsort @ bzrlib.deprecated_graph:18 607.0 607.0 ++++ [DummyProgress]bzrlib.progress @ bzrlib.revision:32 1224.0 618.0 +++ [BzrCommandError]bzrlib.errors @ bzrlib.log:68 606.0 606.0 ++++ [MalformedHunkHeader, MalformedLin @ bzrlib.errors:25 1209.0 603.0 +++ [RevisionInfo]bzrlib.revisionspec @ bzrlib.log:79 605.0 605.0 ++++ bisect @ bzrlib.revisionspec:18 1.0 1.0 ++++ datetime @ bzrlib.revisionspec:19 1842.0 609.0 ++ [l] optparse @ bzrlib.option:394 625.0 625.0 +++ textwrap @ optparse:71 608.0 608.0 +++ [gettext]gettext @ optparse:84 604.0 604.0 ++ [l] [registry]bzrlib @ bzrlib.option:437 7331.0 2.0 bzrlib.plugins.update_mirrors @ :1 7329.0 649.0 + [BzrDir]bzrlib.bzrdir @ bzrlib.plugins.update_mirrors:9 2425.0 606.0 ++ [l] [lockable_files]bzrlib @ bzrlib.bzrdir:1511 1212.0 606.0 +++ bzrlib.transactions @ bzrlib.lockable_files:30 606.0 606.0 ++++ [IdentityMap, NullIdentityMap]bzrl @ bzrlib.transactions:42 606.0 606.0 +++ bzrlib.urlutils @ bzrlib.lockable_files:31 1.0 1.0 +++ [StringIO]cStringIO @ bzrlib.lockable_files:17 2423.0 609.0 ++ [l] [lockdir]bzrlib @ bzrlib.bzrdir:1680 1210.0 605.0 +++ [read_stanza, Stanza]bzrlib.rio @ bzrlib.lockdir:132 605.0 605.0 ++++ [IterableFile]bzrlib.iterablefile @ bzrlib.rio:35 604.0 604.0 +++ [debug, errors]bzrlib @ bzrlib.lockdir:110 1832.0 1227.0 ++ [LocalTransport]bzrlib.transport.l @ bzrlib.bzrdir:79 605.0 605.0 +++ [l] urlparse @ bzrlib.transport:164 5478.0 1.0 bzrlib.plugins.extmerge @ :1 4262.0 612.0 + [WorkingTree]bzrlib.workingtree @ bzrlib.plugins.extmerge:18 2438.0 608.0 ++ bzrlib.mutabletree @ bzrlib.workingtree:90 1830.0 618.0 +++ [errors, osutils, tree]bzrlib @ bzrlib.mutabletree:36 607.0 607.0 ++++ [delta, osutils, revision, conflic @ bzrlib.tree:25 605.0 605.0 ++++ [InterObject]bzrlib.inter @ bzrlib.tree:36 607.0 607.0 ++ [InventoryEntry, Inventory, ROOT_I @ bzrlib.workingtree:87 605.0 604.0 ++ [l] [WorkingTreeFormat4]bzrlib.wor @ bzrlib.workingtree:2916 1.0 1.0 +++ os @ bzrlib.workingtree_4:26 608.0 608.0 + [CONFLICT_SUFFIXES]bzrlib.conflict @ bzrlib.plugins.extmerge:16 605.0 605.0 + [call]subprocess @ bzrlib.plugins.extmerge:12 1.0 1.0 + [Command, register_command]bzrlib. @ bzrlib.plugins.extmerge:14 1.0 1.0 + os @ bzrlib.plugins.extmerge:11 4285.0 1.0 bzrlib.plugins.difftools @ :1 4284.0 618.0 + [builtins, commands, option]bzrlib @ bzrlib.plugins.difftools:42 1224.0 1224.0 ++ [cmd_bundle_info]bzrlib.bundle.com @ bzrlib.builtins:4441 616.0 616.0 ++ [cmd_version_info]bzrlib.cmd_versi @ bzrlib.builtins:4439 615.0 615.0 ++ [cmd_versionedfile_list, cmd_weave @ bzrlib.builtins:4445 606.0 606.0 ++ [StringIO]StringIO @ bzrlib.builtins:20 605.0 605.0 ++ [cmd_sign_my_commits]bzrlib.sign_m @ bzrlib.builtins:4444 1866.0 3.0 bzrlib.plugins.bzrtools @ :1 1252.0 619.0 + bzrlib.ignores @ bzrlib.plugins.bzrtools:44 633.0 632.0 ++ [config, globbing]bzrlib @ bzrlib.ignores:21 1.0 1.0 +++ [warning]bzrlib.trace @ bzrlib.globbing:25 607.0 607.0 + [ExternalCommand]bzrlib.externalco @ bzrlib.commands:149 1.0 1.0 + show_paths @ bzrlib.plugins.bzrtools:50 1.0 1.0 + [BzrPatchSource]patchsource @ bzrlib.plugins.bzrtools:34 1.0 1.0 + [CommandError, NoPyBaz]errors @ bzrlib.plugins.bzrtools:33 1.0 1.0 + [version_info, __version__]version @ bzrlib.plugins.bzrtools:31 1856.0 1.0 bzrlib.plugins.tableau @ :1 1855.0 2.0 + [*]sync @ bzrlib.plugins.tableau:2 1246.0 625.0 ++ [Branch]bzrlib.branch @ bzrlib.plugins.tableau.sync:24 621.0 621.0 +++ [Hooks]bzrlib.hooks @ bzrlib.branch:57 606.0 606.0 ++ shutil @ bzrlib.plugins.tableau.sync:20 1.0 1.0 ++ [urlutils, osutils]bzrlib @ bzrlib.plugins.tableau.sync:23 1239.0 608.0 bzrlib.plugins.launchpad @ :1 631.0 631.0 + [topic_registry]bzrlib.help_topics @ bzrlib.plugins.launchpad:26 627.0 627.0 [*]encodings.utf_8 @ encodings:97 622.0 621.0 [l] zipfile @ bzrlib.plugin:234 1.0 1.0 + binascii @ zipfile:5 622.0 622.0 [TextUIFactory]bzrlib.ui.text @ bzrlib.commands:786 616.0 615.0 bzrlib.plugins.multiparent @ :1 1.0 1.0 + [lazy_import]bzrlib.lazy_import @ bzrlib.plugins.multiparent:7 612.0 612.0 bzrlib.ui @ bzrlib.commands:785 608.0 608.0 bzrlib.inspect_for_copy @ __main__:78 607.0 607.0 bzrlib.breakin @ __main__:84 607.0 607.0 bzrlib.decorators @ __main__:87 606.0 606.0 copy @ bzrlib.inspect_for_copy:72 605.0 605.0 bzrlib.lazy_regex @ __main__:81 605.0 605.0 [*]encodings.cp437 @ encodings:97