Skip to content

9 comments

I just wanted to upvote the blog for including undo instructions.

21 points

The pacman database is insanely inefficient. Merging it into one file increases performance dramatically (I know because I've done it).

8 points

in the future pacman would read directly from core.db.tar.gz and the speed is noticeable (translation HUGE improvement)

3 points

Oh, this is an old trick. I remember using it with portage. Some remarks:

  • mount point doesn't have to be empty, so you can keep your database backup in /var/lib/pacman (after umounting)

  • no need to compress old database. Simply mount the image somewhere and copy all files there.

  • XFS is better for cache-like filesystems, so you may try to use mkfs.xfs.

If your mkfs has to take device instead of file (it works on now on my arch but I remember having problems with it) use: # losetup /dev/loop0 pacman.xfs # mkfs.xfs /dev/loop0 # mount /dev/loop0 /var/lib/pacman

After this you can do simple mount -o loop

3 points

you'd have to benchmark before choosing xfs or reiser. Reiser is very fast in small files, like the ones used by pacamn.

1 points

Well I'll be damned, this is much faster.

For pacman -Syy, just on my root partition: 0m7.187s And the same on a 100mb reiserfs: 0m2.151s

Searching is much faster too, though harder to calculate. To search for "fish" there's a difference of 12 seconds vs 0.4 seconds.

3 points

The most elegant solution would be a SQLite backend for pacman. But until then this will do just fine.

1 points

I have a question: Is it possible or worthwhile to do this to any other parts of the system?

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.