GNU bug report logs - #23967
25.1.50; Slow compilation of ns-win.el

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Wed, 13 Jul 2016 12:20:01 UTC

Severity: wishlist

Found in version 25.1.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 23967 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: larsi <at> gnus.org, 23967 <at> debbugs.gnu.org
Subject: Re: bug#23967: 25.1.50; Slow compilation of ns-win.el
Date: Thu, 14 Jul 2016 17:54:23 +0300
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Wed, 13 Jul 2016 17:15:15 -0400
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 23967 <at> debbugs.gnu.org
> 
> I ran the profiler on a compilation of ucs-normalize.el and found 2
> easy optimizations (ucs-normalize-block-compose-chars was using
> with-temp-buffer in a loop, so I lifted the it out of the loop; using
> regexp-opt-charset instead of regexp-opt saves some char-to-string
> conversion, sorting, and duplicate deletion). The attached patch
> brings the compilation down from 2.5 seconds to 0.8 seconds in my
> normal running Emacs, and using the bootstrap-emacs command posted by
> Lars (swapping ../lisp/international/ucs-normalize.el for
> ../lisp/term/ns-win.el) from 1m30s to 7s.

LGTM, thanks.

However, I'm worried that we have no test for ucs-normalize, so it's
hard to be sure the non-trivial functionality is unchanged, even
though your changes are pretty straightforward.

How about adding a test that uses the data in this file:

  http://www.unicode.org/Public/UNIDATA/NormalizationTest.txt

ucs-normalize claims to have passed an old version of this, but I see
no existing way of re-running that test, did I miss something?

I'd feel much safer if the tests all pass at least as they did with
the old version.

> Could we call `byte-compile' on the byte-compiler functions after loading them?

Maybe, you will have to try.  The bootstrap of the byte compiler is
somewhat tricky, given all the dependencies (see COMPILE_FIRST in
lisp/Makefile.in).

Thanks.




This bug report was last modified 7 years and 95 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.