It's look like most non *.zwc files in /usr/share/zsh are unnecessary.
While it would be annoying to me personally to not have them there, this would save roughly 8 megs.
Clint Adams wrote: It's not so little for have them there. This files not needed for ordinary users. Yes, sometimes it's very handy to see something there. But usually this needed on developing. And if this is permanently it's reasonable to keep them at home. May be it will be better to move this file to zsh-doc, or to other package zsh-doc-functions (which will carry them under doc).
This breaks both the prompt and completion systems. Do you have a working patch?
No. But I've realized two things. First is that completion system depends on non-compiled files. compinit looks for first line to see what to do with it. And second is that zwc files in /usr/share/zsh/functions is not used. mtime for Misc/zcalc is the same as for Misc.zwc, and zsh looks for great time: Src/parse.c, try_dump_file: std.st_mtime > stn.st_mtime strace confirms this. Moreover may be it will be better to compile all functions in functions.zwc ?
File: `/usr/share/zsh/functions/Misc.zwc' Size: 127776 Blocks: 264 IO Block: 4096 regular file Device: fe01h/65025d Inode: 164117 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2010-01-05 12:14:59.000000000 -0500 Modify: 2009-12-12 20:24:48.000000000 -0500 Change: 2009-12-12 20:27:31.000000000 -0500 % stat /usr/share/zsh/functions/Misc/zcalc File: `/usr/share/zsh/functions/Misc/zcalc' Size: 7131 Blocks: 16 IO Block: 4096 regular file Device: fe01h/65025d Inode: 262235 Links: 1 Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2009-12-16 22:04:44.000000000 -0500 Modify: 2009-12-12 20:24:47.000000000 -0500 Change: 2009-12-12 20:27:30.000000000 -0500 Which architecture are you on? Any particular reason?
amd64 % stat -c %y /usr/share/zsh/functions/Misc.zwc 2009-12-28 06:57:20.000000000 +0300 % stat -c %y /usr/share/zsh/functions/Misc/zcalc 2009-12-28 06:57:20.000000000 +0300 Speed, I hope. Search will be faster if it will for only one file. fpath allows to specify .zwc file, I think this is the same case for it. And I don't see any particular reason for divide system functions in multiple .zwc files.
Hi, sergio wrote: Not in the current situation. Only shipping the zwc files and not the source breaks zsh badly. Clint Adams wrote: Yep. sergio wrote: That's especially true on small machines like ALIX, EeePC or many ARM devices which run of SD cards or CF cards. I'd named it zsh-common-extras or zsh-common-source. Clint Adams wrote: Ack. I didn't manage to find one. But I also didn't dig too deep when I noticed that the obvious variant breaks a lot of things. It seems a laborious task to figure out which files are necessary and which are not. If anyone has the leisure to find that set of files, I'll happily accept a proper patch or list of files. I already put hours into it without finding that set of files. In case you want to continue that work or fix this issue in general, see http://anonscm.debian.org/gitweb/?p=collab-maint/zsh.git;a=shortlog;h=refs/heads/abe/split-common and especially http://anonscm.debian.org/gitweb/?p=collab-maint/zsh.git;a=commitdiff;h=04838041ad6e6f6fd865ba05cf22850f93249e5b for what I did so far. Downgrading severity to minor and tagging the bug with "help" as it's not really important, probably more work than gain, but still a small shortcoming. Regards, Axel