Thank you for the hint, that saved 12GB on my machine. Anyway, wouldn't
it be better if we use an extra level of directories to reduce the size
of /nix/store/.links ?

> $ ls -l /nix/store/.links/ | wc -l
> 374716

"ls" is quite slow and this is just my desktop machine and not a busy
server like hydra or something like that. Such a huge directory would
kill slower file manager or other applications. I just think of
PyCharm's "open file" dialog which sometimes tries to open my
/nix/store... this operation freezes the application so that I have to
kill it.

For example git or git-annex introduced an extra level of directories to
reduce the amount of files inside a single directory. Something like
this:

$ tree --charset=ascii /tmp/nix/store/.links/
/tmp/nix/store/.links/
|-- aab
|   |-- aab4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- aabd31b843d1faf29e4d3e50c135d6539ac9fe77ffd
|-- aal
|   |-- aal4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- aald31b843d1faf29e4d3e50c135d6539ac9fe77ffd
|-- ace
|   |-- ace4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- aced31b843d1faf29e4d3e50c135d6539ac9fe77ffd
|-- ehw
|   |-- ehw4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- ehwd31b843d1faf29e4d3e50c135d6539ac9fe77ffd
|-- eia
|   |-- eia4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- eiad31b843d1faf29e4d3e50c135d6539ac9fe77ffd
|-- ial
|   |-- ial4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
|   `-- iald31b843d1faf29e4d3e50c135d6539ac9fe77ffd
`-- ode
    |-- ode4f31a9b3119c2f6bb3b45c27c4cb33ff45a8f6e2
    `-- oded31b843d1faf29e4d3e50c135d6539ac9fe77ffd

7 directories, 14 files


-- 
  Jascha Geerds
  j...@ekby.de
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to