Comment 3 for bug 2059976

Revision history for this message
Benjamin Drung (bdrung) wrote :

The result is promising. I tested on my Ryzen 5700G desktop with the mantic initrd:

```
$ ls /boot/initrd.img-6.5.0-26-generic -l
-rw-r--r-- 1 root root 106445830 Mär 18 18:30 /boot/initrd.img-6.5.0-26-generic
$ time lsinitramfs /boot/initrd.img-6.5.0-26-generic > /dev/null

real 0m13,960s
user 0m17,944s
sys 0m5,098s
$ time ./unmkinitramfs-turbo -l /boot/initrd.img > /dev/null

real 0m1,824s
user 0m2,099s
sys 0m0,915s
$ time cargo run > /dev/null

real 0m0,190s
user 0m0,037s
sys 0m0,147s
$ cargo build --release
$ time target/release/init-cpio > /dev/null

real 0m0,155s
user 0m0,027s
sys 0m0,121s
```

Cutting the time to list the content from roughly 14 second down to 160 ms (1% of the time or factor of 90). Compared to your unmkinitramfs-turbo it is still over 11 times faster.

Okay, I still have to add some consistency check (check the magic), but I can still optimize the code. But before doing that, I need to clean up the code to publish it somewhere.