unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Avoiding autosave of JDEE flycheck files?
@ 2019-01-29 17:48 Steinar Bang
  2019-01-31 18:14 ` 100% CPU usage on emacs startup (Was: Avoiding autosave of JDEE flycheck files?) Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2019-01-29 17:48 UTC (permalink / raw)
  To: help-gnu-emacs

Platform: debian 9.7 "stretch", amd64, emacs 25.1+1-4+deb9u1,
          jdee 20180831.1500 (from melpa)

I'm getting a lot of messages like this, when exiting emacs, and when
running M-x compile :
 Save file /tmp/JDEE_flycheck_16412_kQ/Role.java? (y, n, !, ., q, C-r or C-h)

Is there a way to not get autosave for these files?

An extra datapoint: I'm using emacs-desktop to restore the desktop where
this occurs.  I don't know if that's significant or not?

Thanks!


- Steinar



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

* 100% CPU usage on emacs startup (Was: Avoiding autosave of JDEE flycheck files?)
  2019-01-29 17:48 Avoiding autosave of JDEE flycheck files? Steinar Bang
@ 2019-01-31 18:14 ` Steinar Bang
  2019-02-02  7:38   ` 100% CPU usage on emacs startup Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2019-01-31 18:14 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:

> Platform: debian 9.7 "stretch", amd64, emacs 25.1+1-4+deb9u1,
>           jdee 20180831.1500 (from melpa)

> I'm getting a lot of messages like this, when exiting emacs, and when
> running M-x compile :
>  Save file /tmp/JDEE_flycheck_16412_kQ/Role.java? (y, n, !, ., q, C-r or C-h)

This problem seems to have gone away, however...

> An extra datapoint: I'm using emacs-desktop to restore the desktop where
> this occurs.  I don't know if that's significant or not?

When starting up and restoring the desktop emacs uses 100% of one of the
cores, and after 1h of starup still hasn't completed (and this is a
pretty fast machine).

Does anyone know what causes this?  Is emacs-desktop restore and JDEE
just a bad mix?

One more datapoint: this is when using remote X display over an SSH
connection with X forwarding.

Thanks!



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

* Re: 100% CPU usage on emacs startup
  2019-01-31 18:14 ` 100% CPU usage on emacs startup (Was: Avoiding autosave of JDEE flycheck files?) Steinar Bang
@ 2019-02-02  7:38   ` Steinar Bang
  2019-02-03 18:17     ` Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2019-02-02  7:38 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Steinar Bang <sb@dod.no>:

>> Platform: debian 9.7 "stretch", amd64, emacs 25.1+1-4+deb9u1,
>> jdee 20180831.1500 (from melpa)

>> I'm getting a lot of messages like this, when exiting emacs, and when
>> running M-x compile :
>> Save file /tmp/JDEE_flycheck_16412_kQ/Role.java? (y, n, !, ., q, C-r or C-h)

> This problem seems to have gone away, however...

I think the reason the temp file went away was that I defined the
jdee-server-dir to point to a directory containing the jar file of the
jdee server
 https://github.com/jdee-emacs/jdee-server

>> An extra datapoint: I'm using emacs-desktop to restore the desktop where
>> this occurs.  I don't know if that's significant or not?

> When starting up and restoring the desktop emacs uses 100% of one of the
> cores, and after 1h of starup still hasn't completed (and this is a
> pretty fast machine).

> Does anyone know what causes this?  Is emacs-desktop restore and JDEE
> just a bad mix?

I think this is the case.  In one case emacs eventually came up restored
after 1h 15 minutes of 100% CPU usage on one of the cores of a 3.5GHz
Intel i5-6600 "Skylake" CPU.

However, I removed JDEE, and tried a restore, and emacs desktop restore
was taking too long to restore to be useful (I didn't let it run its
course so I don't know exactly too long).

So I reinstalled JDEE (which does Java formatting a lot better than the
plain old java-mode) and removed the .emacs.desktop and started fresh
and now it works good enough again.

So I guess the simplest solution is to simply delete the .emacs.desktop
once emacs startup becomes too slow to be useful.  

It's good enough for my use case, which is basically to continue where I
was yesterday, and if I have to restart from time to time it's no worse
than when I have to restore my desktop because and OS update causes a
system restart.



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

* Re: 100% CPU usage on emacs startup
  2019-02-02  7:38   ` 100% CPU usage on emacs startup Steinar Bang
@ 2019-02-03 18:17     ` Steinar Bang
  2019-02-03 18:32       ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2019-02-03 18:17 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:

>>> An extra datapoint: I'm using emacs-desktop to restore the desktop where
>>> this occurs.  I don't know if that's significant or not?

>> When starting up and restoring the desktop emacs uses 100% of one of the
>> cores, and after 1h of starup still hasn't completed (and this is a
>> pretty fast machine).

>> Does anyone know what causes this?  Is emacs-desktop restore and JDEE
>> just a bad mix?

> I think this is the case.  In one case emacs eventually came up restored
> after 1h 15 minutes of 100% CPU usage on one of the cores of a 3.5GHz
> Intel i5-6600 "Skylake" CPU.

Now I know what happens:
When the emacs desktop is restored it restores a heap of java files with
names like this (the part after _flycheck_ is different and the filename
is different, one Java file in each directory):
 /tmp/JDEE_flycheck_1004026G/ErrorBean.java

When the files are restored they are taken to be regular .java files and
JDEE tries to figure out what project they are part of and outputs a
heap of error messages.

And the number of restored files baloons every time emacs.desktop is
restored, which eventually results in emacs spending more than 1h at
100% CPU to start up, so yes, emacs desktop and JDEE *is* a very bad
match...:-)

Is there a simple way to exclude these files from emacs.desktop restore,
I wonder...?

Excluding the entire /tmp/ directory would be fine by me.

Thanks!



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

* Re: 100% CPU usage on emacs startup
  2019-02-03 18:17     ` Steinar Bang
@ 2019-02-03 18:32       ` Eli Zaretskii
  2019-02-03 21:36         ` Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2019-02-03 18:32 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Steinar Bang <sb@dod.no>
> Date: Sun, 03 Feb 2019 19:17:38 +0100
> 
> Is there a simple way to exclude these files from emacs.desktop restore,
> I wonder...?

There are the user options desktop-buffers-not-to-save and
desktop-files-not-to-save.



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

* Re: 100% CPU usage on emacs startup
  2019-02-03 18:32       ` Eli Zaretskii
@ 2019-02-03 21:36         ` Steinar Bang
  2019-02-06 19:10           ` Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 2019-02-03 21:36 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Eli Zaretskii <eliz@gnu.org>:

>> Is there a simple way to exclude these files from emacs.desktop restore,
>> I wonder...?

> There are the user options desktop-buffers-not-to-save and
> desktop-files-not-to-save.

Thanks! I've tried adjusting desktop-files-not-to-save to
 "\\(^/[^/:]*:\\|(ftp)$\\|^/tmp\\)"

I'll report back how this works out.




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

* Re: 100% CPU usage on emacs startup
  2019-02-03 21:36         ` Steinar Bang
@ 2019-02-06 19:10           ` Steinar Bang
  0 siblings, 0 replies; 7+ messages in thread
From: Steinar Bang @ 2019-02-06 19:10 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Eli Zaretskii <eliz@gnu.org>:

>>> Is there a simple way to exclude these files from emacs.desktop
>>> restore, I wonder...?

>> There are the user options desktop-buffers-not-to-save and
>> desktop-files-not-to-save.

> Thanks! I've tried adjusting desktop-files-not-to-save to
>  "\\(^/[^/:]*:\\|(ftp)$\\|^/tmp\\)"

> I'll report back how this works out.

Adding all files under /tmp to desktop-files-not-to-save seems to work:
startup times are reasonable and the /tmp files are not saved to
.emacs.desktop 





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

end of thread, other threads:[~2019-02-06 19:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-29 17:48 Avoiding autosave of JDEE flycheck files? Steinar Bang
2019-01-31 18:14 ` 100% CPU usage on emacs startup (Was: Avoiding autosave of JDEE flycheck files?) Steinar Bang
2019-02-02  7:38   ` 100% CPU usage on emacs startup Steinar Bang
2019-02-03 18:17     ` Steinar Bang
2019-02-03 18:32       ` Eli Zaretskii
2019-02-03 21:36         ` Steinar Bang
2019-02-06 19:10           ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).