rxvt-unicode extremely slow to start

Richard Cobbe cobbe at ccs.neu.edu
Wed Aug 24 18:52:33 PDT 2016

On Wed, Aug 24, 2016 at 02:02:22PM -0500, Ken Preslan wrote:
> On Wed, Aug 24, 2016 at 06:46:29PM +0200, Clemens Lang wrote:
> > On Tue, Aug 23, 2016 at 09:19:24PM -0400, Richard Cobbe wrote:
> > > Some time within the last month or so, urxvt (from the rxvt-unicode
> > > package) has become very slow to start, taking on the order of 20
> > > seconds to display the window after I launch it.  Once the window's
> > > up, everything works just fine: the shell or whatever program starts
> > > immediately, the window is responsive to user input, and the window
> > > disappears immediately after exiting the shell or whatever.
> >
> > Smells an aweful lot like a font-cache update going on in the
> > background. Start urxvt under opensnoop:
> >
> >  Shell 1: sudo opensnoop -n rxvt-unicode (or whatever the process name is)
> >  Shell 2: urxvt
> >
> > If it shows opening thousands of font files it's updating the font
> > cache. The question then would be why it doesn't keep the cache. Maybe
> > the location where it tries to put the cache isn't writable?
> I see the same thing with "emacs +x11".  If I revert the "fontconfig"
> package back to r149841, the problem goes away.

Yes, that seems to be exactly what's going on.  Opensnoop indicates that
urxvt is reading large numbers of font files, as well as trying to update
(or at least open) various fontconfig caches:


$HOME/.cache/fontconfig exists; I can read and write both that directory
and all of its contents.

$HOME/.fontconfig doesn't exist, but creating it with permissions 755
doesn't change anything.

/opt/local/var/cache/fontconfig exists, but I only have read access; only
root can write to these files.

I haven't yet had a chance to try with MacPorts's emacs (I typically use a
Cocoa build of Emacs), or reverting the fontconfig package, so I can't say
whether those work.  Reverting fontconfig does look promising, though, and
I'll try that as soon as I have time.

I also added myself to the watch list for bug 52088, as that does seem
related, and I can reproduce the symptons: /opt/local/bin/fc-list (version
2.12.1) is very slow, although /opt/X11/bin/fc-list (version 2.11.1) is
quite fast.

Thanks very much for the help!


More information about the macports-users mailing list