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 |
Alex Branham <[hidden email]> 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 |
In reply to this post by Alex Branham
Alex Branham <[hidden email]> 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 |
In reply to this post by Lars Ingebrigtsen
On Mon 16 Apr 2018 at 09:20, Lars Ingebrigtsen <[hidden email]> wrote: > Alex Branham <[hidden email]> 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) |
Alex Branham <[hidden email]> 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 |
On Mon 16 Apr 2018 at 09:25, Lars Ingebrigtsen <[hidden email]> wrote: > Alex Branham <[hidden email]> 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. |
Alex Branham <[hidden email]> 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 |
In reply to this post by Alex Branham
On Apr 16 2018, Alex Branham <[hidden email]> 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, [hidden email] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." |
In reply to this post by Lars Ingebrigtsen
On Mon 16 Apr 2018 at 09:33, Lars Ingebrigtsen <[hidden email]> 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. |
Alex Branham <[hidden email]> 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 |
Free forum by Nabble | Edit this page |