unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#31179: 26.1; eww leaves processes that slow Emacs
@ 2018-04-16 14:07 Alex Branham
  2018-04-16 14:20 ` Lars Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Alex Branham @ 2018-04-16 14:07 UTC (permalink / raw)
  To: 31179

Eww is slow and makes Emacs slow when visiting a website with (for
example) gifs[1]. Which is understandable, given that a text editor is
trying to display a modern web page.

However, Emacs is slow even after killing the eww buffer. M-x
list-processes shows that several processes are still lying around. Is
there a way to make eww kill these?

Footnotes:
[1]  As an example: http://www.mostlymaths.net/2016/09/more-emacs-configuration-tweaks.html

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2018-04-11 built on mars
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-sound=alsa --with-modules --without-gconf --without-gsettings
 --with-mailutils --with-xml2 --with-x-toolkit=lucid --with-xft
 --with-xaw3d --with-imagemagick 'CFLAGS=-march=x86-64 -mtune=generic
 -O2 -pipe -fstack-protector-strong -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS NOTIFY ACL
GNUTLS LIBXML2 FREETYPE LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS LUCID X11
MODULES THREADS LIBSYSTEMD LCMS2

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





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:07 bug#31179: 26.1; eww leaves processes that slow Emacs Alex Branham
@ 2018-04-16 14:20 ` Lars Ingebrigtsen
  2018-04-16 14:25   ` Alex Branham
  2018-04-16 14:23 ` Lars Ingebrigtsen
  2018-04-16 15:08 ` Andreas Schwab
  2 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 14:20 UTC (permalink / raw)
  To: Alex Branham; +Cc: 31179

Alex Branham <alex.branham@gmail.com> writes:

> Eww is slow and makes Emacs slow when visiting a website with (for
> example) gifs[1]. Which is understandable, given that a text editor is
> trying to display a modern web page.
>
> However, Emacs is slow even after killing the eww buffer. M-x
> list-processes shows that several processes are still lying around. Is
> there a way to make eww kill these?

What processes are these?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:07 bug#31179: 26.1; eww leaves processes that slow Emacs Alex Branham
  2018-04-16 14:20 ` Lars Ingebrigtsen
@ 2018-04-16 14:23 ` Lars Ingebrigtsen
  2018-04-16 15:08 ` Andreas Schwab
  2 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 14:23 UTC (permalink / raw)
  To: Alex Branham; +Cc: 31179

Alex Branham <alex.branham@gmail.com> writes:

> However, Emacs is slow even after killing the eww buffer. M-x
> list-processes shows that several processes are still lying around. Is
> there a way to make eww kill these?
>
> Footnotes:
> [1]  As an example: http://www.mostlymaths.net/2016/09/more-emacs-configuration-tweaks.html

I tried this, and Emacs went back to using 0% CPU after killing off the
ewww buffer, so I'm unable to reproduce this.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:20 ` Lars Ingebrigtsen
@ 2018-04-16 14:25   ` Alex Branham
  2018-04-16 14:25     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-16 14:25 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 31179


On Mon 16 Apr 2018 at 09:20, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Alex Branham <alex.branham@gmail.com> writes:
>
>> Eww is slow and makes Emacs slow when visiting a website with (for
>> example) gifs[1]. Which is understandable, given that a text editor is
>> trying to display a modern web page.
>>
>> However, Emacs is slow even after killing the eww buffer. M-x
>> list-processes shows that several processes are still lying around. Is
>> there a way to make eww kill these?
>
> What processes are these?

For that example url I gave, I have in M-x list-processes:

resources.bl... --      open    --              --           (network connection to resources.blogblog.com)
www.blogger.com --      open    --              --           (network connection to www.blogger.com)
www.mostlyma... --      open    --              --           (network connection to www.mostlymaths.net)





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:25   ` Alex Branham
@ 2018-04-16 14:25     ` Lars Ingebrigtsen
  2018-04-16 14:29       ` Alex Branham
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 14:25 UTC (permalink / raw)
  To: Alex Branham; +Cc: 31179

Alex Branham <alex.branham@gmail.com> writes:

>> What processes are these?
>
> For that example url I gave, I have in M-x list-processes:
>
> resources.bl... -- open -- -- (network connection to
> resources.blogblog.com)
> www.blogger.com -- open -- -- (network connection to www.blogger.com)
> www.mostlyma... -- open -- -- (network connection to
> www.mostlymaths.net)

Well, those are open network connections (which url.el keeps around),
and aren't processes, and should consume approximately zero CPU...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:25     ` Lars Ingebrigtsen
@ 2018-04-16 14:29       ` Alex Branham
  2018-04-16 14:33         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-16 14:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 31179


On Mon 16 Apr 2018 at 09:25, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Alex Branham <alex.branham@gmail.com> writes:
>
>>> What processes are these?
>>
>> For that example url I gave, I have in M-x list-processes:
>>
>> resources.bl... -- open -- -- (network connection to
>> resources.blogblog.com)
>> www.blogger.com -- open -- -- (network connection to www.blogger.com)
>> www.mostlyma... -- open -- -- (network connection to
>> www.mostlymaths.net)
>
> Well, those are open network connections (which url.el keeps around),
> and aren't processes, and should consume approximately zero CPU...

The situation definitely improves for me after closing the eww buffer,
but Emacs is still sluggish. I assumed these extra processes were to
blame, but perhaps that's not right. I don't know what else could be the
culprit though.





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:29       ` Alex Branham
@ 2018-04-16 14:33         ` Lars Ingebrigtsen
  2018-04-16 20:10           ` Alex Branham
  0 siblings, 1 reply; 10+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 14:33 UTC (permalink / raw)
  To: Alex Branham; +Cc: 31179

Alex Branham <alex.branham@gmail.com> writes:

> The situation definitely improves for me after closing the eww buffer,
> but Emacs is still sluggish. I assumed these extra processes were to
> blame, but perhaps that's not right. I don't know what else could be the
> culprit though.

Does `top' say that Emacs is using more CPU after opening and then
killing the eww buffer than before?  And how long does this last?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:07 bug#31179: 26.1; eww leaves processes that slow Emacs Alex Branham
  2018-04-16 14:20 ` Lars Ingebrigtsen
  2018-04-16 14:23 ` Lars Ingebrigtsen
@ 2018-04-16 15:08 ` Andreas Schwab
  2 siblings, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2018-04-16 15:08 UTC (permalink / raw)
  To: Alex Branham; +Cc: 31179

On Apr 16 2018, Alex Branham <alex.branham@gmail.com> wrote:

> Eww is slow and makes Emacs slow when visiting a website with (for
> example) gifs[1]. Which is understandable, given that a text editor is
> trying to display a modern web page.
>
> However, Emacs is slow even after killing the eww buffer. M-x
> list-processes shows that several processes are still lying around. Is
> there a way to make eww kill these?

Does it help to set url-http-attempt-keepalives to nil?

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 14:33         ` Lars Ingebrigtsen
@ 2018-04-16 20:10           ` Alex Branham
  2018-04-16 20:19             ` Lars Ingebrigtsen
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Branham @ 2018-04-16 20:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Andreas Schwab, 31179


On Mon 16 Apr 2018 at 09:33, Lars Ingebrigtsen <larsi@gnus.org> wrote:

> Does `top' say that Emacs is using more CPU after opening and then
> killing the eww buffer than before?  And how long does this last?

Only slightly. It's at 0% before and at 1% after. The amount of time
varies from anywhere between a quarter of a second to maybe 15 or 20
seconds.

Setting url-http-attempt-keepalives to nil as Andreas suggested seems to
solve the problem.





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

* bug#31179: 26.1; eww leaves processes that slow Emacs
  2018-04-16 20:10           ` Alex Branham
@ 2018-04-16 20:19             ` Lars Ingebrigtsen
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Ingebrigtsen @ 2018-04-16 20:19 UTC (permalink / raw)
  To: Alex Branham; +Cc: Andreas Schwab, 31179

Alex Branham <alex.branham@gmail.com> writes:

> Only slightly. It's at 0% before and at 1% after. The amount of time
> varies from anywhere between a quarter of a second to maybe 15 or 20
> seconds.
>
> Setting url-http-attempt-keepalives to nil as Andreas suggested seems to
> solve the problem.

Huh.  20 seconds is perhaps the time it takes for url to close the
connections normally?

But all this points to idle open connections slowing down your Emacs?
That's interesting...  and shouldn't happen.  How sluggish did this make
your Emacs?

The Emacs network connection code should be asynchronous and not lead to
any noticeable delays when you have idle connections, even if they're
TLS connections.  So it sounds like we might have an obscure bug
somewhere in that area?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2018-04-16 20:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-16 14:07 bug#31179: 26.1; eww leaves processes that slow Emacs Alex Branham
2018-04-16 14:20 ` Lars Ingebrigtsen
2018-04-16 14:25   ` Alex Branham
2018-04-16 14:25     ` Lars Ingebrigtsen
2018-04-16 14:29       ` Alex Branham
2018-04-16 14:33         ` Lars Ingebrigtsen
2018-04-16 20:10           ` Alex Branham
2018-04-16 20:19             ` Lars Ingebrigtsen
2018-04-16 14:23 ` Lars Ingebrigtsen
2018-04-16 15:08 ` Andreas Schwab

Code repositories for project(s) associated with this public inbox

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

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).