all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Compilation mode very slow with large files
@ 2008-02-25  3:17 Giuseppe Scelsi
  0 siblings, 0 replies; 5+ messages in thread
From: Giuseppe Scelsi @ 2008-02-25  3:17 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

In Emacs 22.1.1 for Windows, when I open a large file (15 MB) and then
switch to compilation mode, emacs hangs.  I suspect it is very slow in
processing the buffer, maybe fontifying?  Does anyone have a suggestion
on how to work around this?  I am really interested in getting the
active links to the source code, I wouldn't mind if there is no error
colorization.

Thanks in advance.

Giuseppe




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Compilation mode very slow with large files
@ 2008-03-02 23:53 Giuseppe Scelsi
  2008-03-03  2:22 ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Scelsi @ 2008-03-02 23:53 UTC (permalink / raw)
  To: emacs-devel

Hi,

In Emacs 22.1.1 for Windows, when I open a large text file (15 MB) in
fundamental mode and then switch to compilation mode, emacs hangs for
ever, while the status bar displays "Fontifying <filename>...".  I tried
to set '`global-font-lock-mode' to nil, with no success.

Hitting C-g manages to stop the process, but the buffer is left with no
fontification or hot links, in spite of reading '(Compilation)' in the
status bar.

I tried using 'debug-on-entry' and stepping through the code, but this
causes no apparent change in the buffer in spite of the process
terminating successfully with no error messages.

Is this a bug or an expected behaviour?  Does anyone have a suggestion
on how to work around this?  Or any hint about to further debug the
problem?  I am really interested in getting the active click-on links to
the relevant lines of source code, I wouldn't mind if fontification were
switched off.

Thanks in advance.

Giuseppe




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation mode very slow with large files
  2008-03-02 23:53 Compilation mode very slow with large files Giuseppe Scelsi
@ 2008-03-03  2:22 ` Stefan Monnier
  2008-03-03  2:26   ` Giuseppe Scelsi
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2008-03-03  2:22 UTC (permalink / raw)
  To: giuseppe.scelsi; +Cc: emacs-devel

> In Emacs 22.1.1 for Windows, when I open a large text file (15 MB) in
> fundamental mode and then switch to compilation mode, emacs hangs for
> ever, while the status bar displays "Fontifying <filename>...".

Yes.  This is expected.  Could explain why you're doing this?


        Stefan


PS: As for why this is; compilation-mode uses font-lock internally, so
turning off global-font-lock-mode doesn't help because compilation-mode
forces it back on anyway; furthermore compilation-mode needs font-lock
to work "top-to-bottom" rather than "first treat the part that's
displayed", so it disables jit-lock, thus causing the whole buffer to be
fontified at start.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation mode very slow with large files
  2008-03-03  2:22 ` Stefan Monnier
@ 2008-03-03  2:26   ` Giuseppe Scelsi
  2008-03-03  2:50     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Giuseppe Scelsi @ 2008-03-03  2:26 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan,

The reason I am doing this is to analyse build logs produced in the
past.  It is very useful to be able to click on an error and jump
straight to the source code.  Is there any way I could do this other
than through the compilation mode (and writing my own lisp code)?

Giuseppe

----

> > In Emacs 22.1.1 for Windows, when I open a large text file (15 MB) in
> > fundamental mode and then switch to compilation mode, emacs hangs for
> > ever, while the status bar displays "Fontifying <filename>...".
>
> Yes.  This is expected.  Could explain why you're doing this?
>
>
>         Stefan
>
>
> PS: As for why this is; compilation-mode uses font-lock internally, so
> turning off global-font-lock-mode doesn't help because compilation-mode
> forces it back on anyway; furthermore compilation-mode needs font-lock
> to work "top-to-bottom" rather than "first treat the part that's
> displayed", so it disables jit-lock, thus causing the whole buffer to be
> fontified at start.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Compilation mode very slow with large files
  2008-03-03  2:26   ` Giuseppe Scelsi
@ 2008-03-03  2:50     ` Stefan Monnier
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2008-03-03  2:50 UTC (permalink / raw)
  To: Giuseppe Scelsi; +Cc: emacs-devel

> The reason I am doing this is to analyse build logs produced in
> the past.

That makes sense.

> It is very useful to be able to click on an error and jump
> straight to the source code.  Is there any way I could do this other
> than through the compilation mode (and writing my own lisp code)?

You should be able to force compilation-mode to use jit-lock (which
should fix your problems), tho I'm not sure how.

Maybe

  (require 'compile)
  (add-hook 'compilation-turn-on-font-lock
            (lambda () (kill-local-variable 'font-lock-support-mode)))

100% guaranteed untested,


        Stefan


PS: jit-lock will introduce various problems, such as the fact that
C-x ` may incorrectly tell you there's no more errors.  Or the fact that
directory change messages may not be obeyed.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-03  2:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-02 23:53 Compilation mode very slow with large files Giuseppe Scelsi
2008-03-03  2:22 ` Stefan Monnier
2008-03-03  2:26   ` Giuseppe Scelsi
2008-03-03  2:50     ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2008-02-25  3:17 Giuseppe Scelsi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.