GNU bug report logs - #25706
26.0.50; Slow C file fontification

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs,cc-mode; Reported by: Sujith <m.sujith@HIDDEN>; dated Mon, 13 Feb 2017 18:41:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 Feb 2017 18:40:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 13 13:40:25 2017
Received: from localhost ([127.0.0.1]:38828 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cdLY1-0007AM-4S
	for submit <at> debbugs.gnu.org; Mon, 13 Feb 2017 13:40:25 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <m.sujith@HIDDEN>) id 1cdLAK-0006Zq-22
 for submit <at> debbugs.gnu.org; Mon, 13 Feb 2017 13:15:56 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <m.sujith@HIDDEN>) id 1cdLAC-000434-Vi
 for submit <at> debbugs.gnu.org; Mon, 13 Feb 2017 13:15:50 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:52057)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <m.sujith@HIDDEN>) id 1cdLAC-00042w-Qc
 for submit <at> debbugs.gnu.org; Mon, 13 Feb 2017 13:15:48 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45764)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <m.sujith@HIDDEN>) id 1cdLAA-0002QM-Fg
 for bug-gnu-emacs@HIDDEN; Mon, 13 Feb 2017 13:15:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <m.sujith@HIDDEN>) id 1cdLA6-00041a-T2
 for bug-gnu-emacs@HIDDEN; Mon, 13 Feb 2017 13:15:46 -0500
Received: from mail-ot0-x236.google.com ([2607:f8b0:4003:c0f::236]:33279)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <m.sujith@HIDDEN>) id 1cdLA6-00040r-Mk
 for bug-gnu-emacs@HIDDEN; Mon, 13 Feb 2017 13:15:42 -0500
Received: by mail-ot0-x236.google.com with SMTP id 73so74681214otj.0
 for <bug-gnu-emacs@HIDDEN>; Mon, 13 Feb 2017 10:15:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=user-agent:from:to:subject:date:message-id:mime-version;
 bh=xDTDzvEhg9p735EOjrEaLAIrdAB+UAVca0QBt3Dq1tk=;
 b=EMKImyjyUs44vx3tWvu71FXUEYAQx9D/Vqt5reKoQJYgue/k5NrFMLxRNGtS9K2vS2
 KSZxzIeHSxOa7GrmkElGwbQtWqzUUWRzClCFjhEIVJ7o5q7qAGlGLrFGKKHs8Z9mTy3B
 zZnioN3Cn4MP3KcSY1NdGwfgl0/2tCyya/WfnzxMqjCR1CTpFH/iuykf2nZa7j1ZEHyS
 yYUj9INz1M8o4KNnKknzmICbU9Ahs6SYk7t4b8K6UIaTj6qB2h1Mr9nq3uEuawJYATY8
 z0HZmmb9O1Q8NCJvIFXcrNmUjgYjnpHgYxpnvUSdz0piWagXmbAYPJKyRYXEaxx/EaDS
 iJ3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:user-agent:from:to:subject:date:message-id
 :mime-version;
 bh=xDTDzvEhg9p735EOjrEaLAIrdAB+UAVca0QBt3Dq1tk=;
 b=iNfJe4AK7HxUPqYc2sHeugnAJaDpnmkeD7oJx0guXkOz7wNl/B863bx8S5pL6GCRkJ
 kCOBk1RI7thI3WKkG1JpPa4zSQ/1tPw8bYXEy4r5OZxLUc8qJ6Ok/6bXXk3OKGT7RmG+
 I8VM7eaq3tJRIcBUqce50WUPdtt+HEL45VyHSOKR4ZvytYWdkC9CsWWA+t1WhKzt0H93
 tpEBTVtGQZwgBysOSewZq9PQGJz64Mkv8SAyRkVmD2ksdOETHl0VMSXFX9LagFlrPZZ/
 /MRKZnnLnbnHiypY0N52Cekw/zwysqxE8AXZ2332QIY4KYtegZG9671fYJn1HwLiDwNK
 Z1xw==
X-Gm-Message-State: AMke39n9cQanLeVcR4bl5nomTZeSDsnR3lNKmeLPJCNpVwfNJvOPv2TN+dzK345UtVTgkw==
X-Received: by 10.99.149.27 with SMTP id p27mr28266740pgd.21.1487009739798;
 Mon, 13 Feb 2017 10:15:39 -0800 (PST)
Received: from the-damned ([117.209.218.77])
 by smtp.gmail.com with ESMTPSA id o125sm15982328pfb.109.2017.02.13.10.15.37
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 13 Feb 2017 10:15:39 -0800 (PST)
User-agent: mu4e 0.9.19; emacs 26.0.50.1
From: Sujith <m.sujith@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.0.50; Slow C file fontification
Date: Mon, 13 Feb 2017 23:50:20 +0530
Message-ID: <87inoe2brv.fsf@the-damned>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Mon, 13 Feb 2017 13:40:24 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

On a machine that is not very high-powered, opening some C files
and trying to edit/view them is very slow.

For example:
https://raw.githubusercontent.com/qca/qcamain_open_hal_public/master/hal/ar9300/osprey_reg_map_macro.h

This is a large file and filled with macros.
Is there any way to view this without disabling font-lock entirely ?
I am using the master branch and I have these in my .emacs:

(global-font-lock-mode t)
(setq font-lock-maximum-decoration
      (quote ((c-mode . 2) (c++-mode . 2) (t . t))))
(setq c-font-lock-extra-types
      (quote
       ("\\sw+_t" "bool" "complex" "imaginary" "FILE" "lconv" "tm" "va_list" "jmp_buf" "Lisp_Object"
	"u8" "u16" "u32" "u64"
	"s8" "s16" "s32" "s64"
	"__le16" "__le32" "__le64"
	"__be16" "__be32" "__be64"
	"__s8" "__s16" "__s32" "__s64"
	"__u8" "__u16" "__u32" "__u64")))

The machine is a low-end 10-inch netbook. Some details:

$ uname -a
Linux the-damned 4.10.0-rc7-wt #16 SMP PREEMPT Tue Feb 7 10:47:38 IST 2017 x86_64 GNU/Linux

$ free -m -h
              total        used        free      shared  buff/cache   available
Mem:           1.8G        542M        560M         87M        766M        1.0G
Swap:          2.0G         24M        2.0G

$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 55
model name      : Intel(R) Celeron(R) CPU  N2807  @ 1.58GHz
stepping        : 8
microcode       : 0x811
cpu MHz         : 1828.644
cache size      : 1024 KB

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 55
model name      : Intel(R) Celeron(R) CPU  N2807  @ 1.58GHz
stepping        : 8
microcode       : 0x811
cpu MHz         : 1805.267
cache size      : 1024 KB


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 6.3.1 20170109 (GCC)


In GNU Emacs 26.0.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.7)
 of 2017-02-13 built on the-damned
Repository revision: 271dcf8652ccf94d8582b2bcdb26f066d0b946a2
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000
Recent messages:
Checking 57 files in /usr/share/emacs/26.0.50/lisp/eshell...
Checking 70 files in /usr/share/emacs/26.0.50/lisp/erc...
Checking 34 files in /usr/share/emacs/26.0.50/lisp/emulation...
Checking 172 files in /usr/share/emacs/26.0.50/lisp/emacs-lisp...
Checking 24 files in /usr/share/emacs/26.0.50/lisp/cedet...
Checking 57 files in /usr/share/emacs/26.0.50/lisp/calendar...
Checking 87 files in /usr/share/emacs/26.0.50/lisp/calc...
Checking 103 files in /usr/share/emacs/26.0.50/lisp/obsolete...
Checking for load-path shadows...done
Message modified; kill anyway? (y or n) y

Configured using:
 'configure --prefix=/usr --without-libsystemd --without-dbus
 --without-gconf --without-gsettings --without-selinux --without-threads
 --without-gpm --without-xaw3d --without-toolkit-scroll-bars
 --without-m17n-flt --without-libotf --without-imagemagick
 --without-rsvg --without-png --without-gif --without-tiff
 --without-jpeg --without-xpm --with-sound=no CFLAGS=-O3'

Configured features:
NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB GTK3 X11

Important settings:
  value of $LANG: en_IN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: C

Minor modes in effect:
  global-magit-file-mode: t
  magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  display-battery-mode: t
  display-time-mode: t
  iswitchb-mode: t
  savehist-mode: t
  save-place-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: 1
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
/home/sujith/.emacs.d/elpa/emms-20160304.920/tq hides /usr/share/emacs/26.0.50/lisp/emacs-lisp/tq

Features:
(cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs pp shadow flyspell ispell face-remap emacsbug ibuf-ext
ibuffer ibuffer-loaddefs w3m-form w3m-filter w3m-bookmark w3m-tabmenu
w3m-session ffap w3m timezone w3m-hist w3m-fb bookmark-w3m w3m-ems
wid-edit w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util dired-aux
magit-obsolete magit-blame magit-stash magit-bisect magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-branch
magit-files magit-refs magit-status magit magit-repos magit-apply
magit-wip magit-log magit-diff smerge-mode diff-mode magit-core
magit-autorevert autorevert filenotify magit-process magit-margin
magit-mode magit-git crm magit-section magit-popup git-commit
magit-utils log-edit easy-mmode pcvs-util add-log with-editor
async-bytecomp async tramp-sh tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell pcomplete parse-time dash advice mu4e-contrib mu4e
desktop frameset mu4e-speedbar speedbar sb-image ezimage dframe
mu4e-main mu4e-context mu4e-view cal-menu calendar cal-loaddefs
thingatpt browse-url comint ansi-color mu4e-headers mu4e-compose
mu4e-draft mu4e-actions ido rfc2368 smtpmail sendmail mu4e-mark
mu4e-message flow-fill html2text mu4e-proc mu4e-proc-mu mu4e-utils
doc-view jka-compr image-mode mu4e-lists mu4e-vars message puny
format-spec rfc822 mml mml-sec epa derived epg gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader hl-line cl mu4e-meta battery time dired-x dired
dired-loaddefs edmacro kmacro xcscope ring server iswitchb savehist
saveplace finder-inf info package epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt subr-x gv bytecomp byte-compile
cl-extra help-mode easymenu cconv cl-loaddefs pcase cl-lib time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript case-table
epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote inotify dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 1112940 3463)
 (symbols 48 36857 5)
 (miscs 40 96 357)
 (strings 32 73343 16247)
 (string-bytes 1 2484237)
 (vectors 16 59639)
 (vector-slots 8 1342999 94842)
 (floats 8 475 158)
 (intervals 56 127752 56)
 (buffers 976 21))




Acknowledgement sent to Sujith <m.sujith@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#25706; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

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