[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standalone Info reader cannot read Info files with CR-LF EOLs

From: Eli Zaretskii
Subject: Re: Standalone Info reader cannot read Info files with CR-LF EOLs
Date: Sat, 10 Jan 2015 17:31:45 +0200

> Date: Thu, 8 Jan 2015 11:00:40 +0000
> From: Gavin Smith <address@hidden>
> Cc: Texinfo <address@hidden>
> On Sat, Jan 3, 2015 at 3:29 PM, Eli Zaretskii <address@hidden> wrote:
> > As you see, wcwidth and locale_charset, both from gnulib in my build,
> > take 75% of the time.
> >
> > I thought that perhaps the reason was that your locale is UTF-8, so
> > Info doesn't need to convert text using libiconv in your locale.  But
> > removing the UTF-8 encoding tag from the ELisp Info file didn't have
> > any visible effect on the delay, so that's not it.
> >
> > Suggestions for further digging into this are welcome.
> One way to check would be to comment out the call to wcwidth, and
> replace with the value "1", and see if it is still slow.

Doing this completely solves the problem.

Moreover, if I replace the line that calls wcwidth:

      *pchars = wcwidth ((*iter).cur.wc);

with what constitutes the body of the gnulib implementation, i.e.:
      *pchars = (*iter).cur.wc ? (iswprint ((*iter).cur.wc) ? 1 : -1) : 0;

I don't see any slowdown, either.

My conclusion is that the reason for the slowdown is the call to
locale_charset inside gnulib's wcwidth is the culprit, because my
locale's charset is not UTF-8.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]