]> git.eshelyaron.com Git - emacs.git/commit
Improve performance when computing the "readable" form of a page in EWW
authorJim Porter <jporterbugs@gmail.com>
Thu, 19 Jun 2025 17:23:39 +0000 (10:23 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 26 Jul 2025 15:23:14 +0000 (17:23 +0200)
commitd8d0ea60fbc241166dbdb19d1ff539fea20cd10a
tree3b06206d43b1664d8bb31d408017b91ce86447a7
parent587e6d4715981e180995888b1794ba4bfdeb3613
Improve performance when computing the "readable" form of a page in EWW

The previous version made a lot of string copies, but only needed the
word count of each DOM node.  In this version, we just sum up the word
counts in all the existing nodes, which results in a significant
performance improvement (bug#78902).

* lisp/net/eww.el (eww--string-count-words, eww--dom-count-words): New
functions...
(eww--walk-readability, eww-readable-dom): Use them.

(cherry picked from commit c5f649441e2e055701c7bee811eaf266c4f0e7ce)
lisp/net/eww.el