On Sat, May 29, 2010 at 04:31:23PM -0500, Dan McGee wrote:
On Sat, May 29, 2010 at 4:22 PM, Andres P <aepd87@gmail.com> wrote:
On Sat, May 29, 2010 at 04:17:16PM -0500, Dan McGee wrote:
If bsdtar -tf is deemed as reliable, then it should make the file(1) check redundant, seeing that makepkg uses bsdtar to extract.
Except you've now introduced the overhead of reading every archive twice which is really stupid, since 95% of files will pass the "file" check.
I realized that it was slower before I mentioned it: ?? ??$ time for i in {1..1000}; do file -bizL neon-0.29.3-2-i686.pkg.tar.xz >/dev/null; done ?? ??real ?? ??0m20.664s ?? ??$ time for i in {1..1000}; do bsdtar -tf neon-0.29.3-2-i686.pkg.tar.xz >/dev/null; done ?? ??real ?? ??1m16.193s
But it greatly simplifies code :/
It's the python dilemma...
neon? What is that, 172K? Try something that would really suck. I don't care if it greatly simplifies code.
dmcgee@dublin ~ $ ll /var/cache/makepkg/src/linux-2.6.34.tar.bz2 -rw-r--r-- 1 dmcgee wheel 65M May 16 20:46 /var/cache/makepkg/src/linux-2.6.34.tar.bz2
This is *ONE* iteration:
dmcgee@dublin ~ $ time bsdtar -tf /var/cache/makepkg/src/linux-2.6.34.tar.bz2 >/dev/null
real 0m51.631s user 0m49.940s sys 0m0.287s
Would caching help here if "bsdtar -tf" loads the archive into memory?
-Dan