Re: open archive per level
Denis Corbin <[email protected]> Sun, 20 Oct 2013 19:15:26 +0200
| Newsgroups | gmane.comp.sysutils.backup.dar.libdar |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 20/10/2013 15:06, Tobias wrote: > Hi, Hello, > > i'm programming a graphical user interface for restoring Dar backups. nice to hear about that :) > > To list the archive content I'm using the dynamic archive content > listing option like described in chapter 7 of your API tutorial. > Thank you for that, it's working really well. > But it seams like the "read" constructor reads the whole catalogue. Yes that's correct > Is it possible to change that behavior in a way > that the catalogue gets read per level? it would be difficult to be implemented that way, because: 1 - the catalogue is compressed as a whole (thus this per level read of a catalogue would imply uncompressing the same data several time to read further catalogue entries 2 - even without compression, to find the contents of a given directory would require a lot of work: the directory tree is stored using a "in-depth" tree order. In other words, at creation time when comes the time to write down the catalogue, when a subdirectory is found its whole contents is written down to the archive before proceeding to the next file or next subdirectory found at that level. So its more efficient to build in memory the whole catalogue from the archive and then to extract by level the requested information from it. > That would really boost the performance. I don't think so. Even, if you just want to read the contents of one directory it would takes almost the same amount of time and will reduce memory requirement. But for the next directory reading you would have to do the same operation another time ... so globally I think this is faster the way it is actually implemented (with all the CPU cycle being done before being able to read any archive content). > > Kind regards > Tobias > > Kind Regards, Denis. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIVAwUBUmQPrggxsL0D2LGCAQKXig//ZpOtlcvX6Dh76Z+xRYHf/QYeH6SpP1Cq viWSh3pC+5ONYtGUWJRT16ze6NWj7P8kmmRX3dSj68C/BYWJ0YdX9jYqgneLSzIn JUb8/H6kuwZ1htE/BDIFVIBXl4Ye7VjJP6T8J2Xf/qx4Owkug3Aby43QI2/fr7DL Mxog5PgpeJpNAK84frPvSsAMciEhf+dDnBcMLmCgDkqUDGqsSsay4E/E/51cteM6 2NbN5FHep4gAOY60uEpVqYLLkIbJN9pPgUnyptKDJ5XC1ApZo51NB1UBJe5lt5K5 U58u43vzy/ZF12IwqXOfea0fAl5k7XZ7Pu3WnIg+OOamtQA995rHLx3CKUvd2qhk NcJdjiChnu90HpouYqgmhcsCSSVFeiTokO1I3mdm+qk2J2sW7kUxGZrCTPpT3AMR YtU4p2I0KXIL4v8ljdvggC+97pt3NdmF7gQTpmPA19TMZfzx6iHJWz1UXaym/cQw XzFo63x+xxwBzE95+vdzAoIRtCajIVCFzA3vCoaii9JCqPLS2CsOlJYzWaJ2D+Cd u9Z56oU7eQ7Ny4MjlQoDeMWYSKUpwrBuvbpLWGQU/nZwG5UpocijGizGvNMGxerI zXtRDqP/PM5NflPF6hk7G/WrZQ3xWkqjKUM5RXt2X+JldeTQ9nVKt4t+7ZtGxPC4 MsSNNvc/q38= =PWgR -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk