Subject: Re: bug#67981: Poor shr performance on text-only webpage

From: Eli Zaretskii <[email-masked]>
Date: Sat, 23 Dec 2023 10:12:50 +0200

> From: Karthik Chikmagalur <[email-masked]>
> Date: Fri, 22 Dec 2023 19:02:59 -0800
> 
> The function shr-descend (part of shr.el) performs very poorly when
> rendering web pages.  This is not noticeable for small documents, but
> when loading https://orgmode.org/manual.html, it locks up Emacs for
> 10+ seconds at 100% CPU utilization on one core.  In comparison, it
> loads in 2-3 seconds in Firefox without a CPU spike.  (I have a
> reasonably fast three year old laptop.)
> 
> --8<---------------cut here---------------start------------->8---
> ;; -*- lexical-binding: t; -*-
> 
> (let ((now (float-time)))
>   (add-hook 'eww-after-render-hook
> 	    (lambda ()
> 	      (message "EWW took %f seconds" (- (float-time) now))))
>   (eww "https://orgmode.org/org.html"))
> 
> ;; => EWW took 10.606935 seconds
> --8<---------------cut here---------------end--------------->8---
> 
> Note that the above link is a long text only page with little to no CSS
> and no Javascript.
> 
> I did some profiling to see what is slowing it down.  If I'm reading
> the profile correctly, 

The "memory" profile is not interesting if your system can produce the
"cpu" profile.  I attach a fully expanded "cpu" profile below.

> - About 240,587,126,505 bytes (240 GB) of memory are allocated, and
>   almost all of it is split evenly between shr-render-td and
>   shr-render-td-1.

I don't think it's interesting to look at the "memory" profile counts.
Emacs allocates memory a lot, but the counts you see don't tell you
which parts are immediately freed (e.g., used within a single function
as temporary storage, and freed before the function returns).  Also,
most of that memory is not Lisp memory, i.e. not for Lisp objects.

> - about 54% of the the rendering time (10+ seconds) is spent in
>   shr-descend, split between shr-tag-table and shr-tag-div.
> 
> - About 35% of the time is spent doing GC.
> 
> Is there some reason it's this slow and allocates so much memory? The
> only thing I noticed is that shr-descend and shr-render-td both use
> intern a lot, perhaps that's one source of the allocation?

I'm not sure allocation of Lisp memory can be avoided, the way shr.el
works.  Rendering 23K lines of HTML does require to cons a lot of Lisp
objects.

You can slash the time a little by making the following
customizations:

  (setopt textsec-check nil)
  (setopt shr-use-fonts nil)

Here's the profile in human-readable format.  Looking at it, I don't
see how we could speed this up considerably.  Ideas and patches
welcome.

        2837  50% - ...
        2837  50%    Automatic GC
        2760  49% - url-http-generic-filter
        2760  49%  - url-http-chunked-encoding-after-change-function
        2759  49%   - url-http-activate-callback
        2759  49%    - apply
        2759  49%     - eww-render
        2759  49%      - let*
        2759  49%       - unwind-protect
        2759  49%        - progn
        2759  49%         - cond
        2759  49%          - eww-display-html
        2759  49%           - let
        2691  47%            - save-current-buffer
        2688  47%             - let
        2688  47%              - funcall-with-delayed-message
        2688  47%               - #<lambda 0x73cd2989dcfe>
        2688  47%                - shr-insert-document
        2688  47%                 - let
        2688  47%                  - unwind-protect
        2688  47%                   - progn
        2637  47%                    - shr-fill-lines
        2637  47%                     - if
        2637  47%                      - save-restriction
        2635  46%                       - while
        2629  46%                        - if
        2629  46%                         - progn
        2629  46%                          - shr-fill-line
        2629  46%                           - let
        2321  41%                            - let
        2312  41%                             - if
        2312  41%                              - progn
        2312  41%                               - put-text-property
        2311  41%                                - shr-face-background
        2311  41%                                 - and
        2311  41%                                  - or
        2311  41%                                   - let
        2311  41%                                    - let
        2311  41%                                     - while
        2311  41%                                      - let
        2311  41%                                       - if
        2310  41%                                        - shr-descend
        2310  41%                                         - let
        2310  41%                                          - if
        2310  41%                                           - cond
        2310  41%                                            - funcall
        2071  36%                                             - shr-tag-h5
        2071  36%                                              - shr-heading
        2071  36%                                               - apply
        2071  36%                                                - shr-fontize-dom
        2071  36%                                                 - let
        2070  36%                                                  - shr-generic
        2070  36%                                                   - let
        2070  36%                                                    - while
        2070  36%                                                     - let
        2070  36%                                                      - if
        2070  36%                                                       - shr-descend
        2070  36%                                                        - let
        2070  36%                                                         - if
        2070  36%                                                          - cond
        2040  36%                                                           - funcall
        1968  35%                                                            - shr-tag-table
        1967  35%                                                             - let*
        1967  35%                                                              - if
        1944  34%                                                               - if
        1944  34%                                                                - let
        1941  34%                                                                 - shr-tag-table-1
        1941  34%                                                                  - let*
        1739  30%                                                                   - or
        1739  30%                                                                    - shr-make-table
        1739  30%                                                                     - or
        1739  30%                                                                      - let
        1739  30%                                                                       - shr-make-table-1
        1739  30%                                                                        - let
        1739  30%                                                                         - let
        1739  30%                                                                          - while
        1739  30%                                                                           - let
        1739  30%                                                                            - if
        1739  30%                                                                             - progn
        1737  30%                                                                              - let
        1736  30%                                                                               - while
        1734  30%                                                                                - if
        1731  30%                                                                                 - progn
        1724  30%                                                                                  - if
        1720  30%                                                                                   - progn
        1718  30%                                                                                    - let
        1712  30%                                                                                     - shr-render-td
        1707  30%                                                                                      - let
        1682  29%                                                                                       - or
        1642  29%                                                                                        - let*
        1636  29%                                                                                         - shr-render-td-1
        1635  29%                                                                                          - let
        1599  28%                                                                                           - save-current-buffer
        1598  28%                                                                                            - unwind-protect
        1561  27%                                                                                             - progn
        1557  27%                                                                                              - let
        1516  27%                                                                                               - let
        1025  18%                                                                                                - shr-descend
        1018  18%                                                                                                 - let
        1014  18%                                                                                                  - if
        1005  17%                                                                                                   - cond
        1003  17%                                                                                                    - shr-generic
        1002  17%                                                                                                     - let
        1002  17%                                                                                                      - while
        1002  17%                                                                                                       - let
        1001  17%                                                                                                        - if
         994  17%                                                                                                         - shr-descend
         993  17%                                                                                                          - let
         984  17%                                                                                                           - if
         981  17%                                                                                                            - cond
         981  17%                                                                                                             - funcall
         979  17%                                                                                                              - eww-tag-a
         977  17%                                                                                                               - let
         945  16%                                                                                                                - shr-tag-a
         944  16%                                                                                                                 - let
         862  15%                                                                                                                  - if
         862  15%                                                                                                                   - progn
         628  11%                                                                                                                    - let*
         626  11%                                                                                                                     - and
         624  11%                                                                                                                      - or
         623  11%                                                                                                                       - textsec-suspicious-p
         349   6%                                                                                                                        - textsec-url-suspicious-p
         246   4%                                                                                                                         - textsec-domain-suspicious-p
         185   3%                                                                                                                          - textsec-ascii-confusable-p
         185   3%                                                                                                                           - textsec-restriction-level
         170   3%                                                                                                                            - textsec-covering-scripts
          73   1%                                                                                                                             - seq-union
          53   0%                                                                                                                              - seq-reduce
          27   0%                                                                                                                               - seq-do
          25   0%                                                                                                                                - mapc
          18   0%                                                                                                                                 - #<compiled -0x1c81e23f96f80b01>
          14   0%                                                                                                                                  - #<compiled -0x54db5cc1ce55b54>
          10   0%                                                                                                                                   - seq-contains-p
           1   0%                                                                                                                                      seq-do
          14   0%                                                                                                                               - seq-empty-p
           4   0%                                                                                                                                  apply
          72   1%                                                                                                                             - seq-difference
          44   0%                                                                                                                              - seq-reduce
          30   0%                                                                                                                               - seq-do
          28   0%                                                                                                                                - mapc
          23   0%                                                                                                                                 - #<compiled -0x1cedde8780de0b01>
          21   0%                                                                                                                                  - #<compiled -0x54da0d04063ff54>
          15   0%                                                                                                                                   - seq-contains-p
           6   0%                                                                                                                                    - seq-do
           4   0%                                                                                                                                     - mapc
           2   0%                                                                                                                                        #<compiled -0x1dff8a621eb643fa>
           4   0%                                                                                                                               - seq-empty-p
           1   0%                                                                                                                                  apply
          11   0%                                                                                                                              - seq-reverse
           5   0%                                                                                                                               - apply
           4   0%                                                                                                                                  #<compiled -0x47b1d72b2461ccc>
          14   0%                                                                                                                             - textsec-scripts
          14   0%                                                                                                                              - seq-map
          10   0%                                                                                                                               - apply
           8   0%                                                                                                                                - #<compiled 0x184c52027f5d6bf4>
           7   0%                                                                                                                                   mapcar
          30   0%                                                                                                                          - puny-highly-restrictive-domain-p
          18   0%                                                                                                                           - seq-every-p
          16   0%                                                                                                                            - seq-do
          16   0%                                                                                                                             - mapc
          15   0%                                                                                                                              - #<compiled -0x7437d996da07cda>
          14   0%                                                                                                                               - puny-highly-restrictive-string-p
           9   0%                                                                                                                                - seq-map
           9   0%                                                                                                                                 - apply
           9   0%                                                                                                                                  - #<compiled 0x184c52027f5d6bf4>
           8   0%                                                                                                                                     mapcar
           4   0%                                                                                                                                - seq-uniq
           4   0%                                                                                                                                   apply
           5   0%                                                                                                                             split-string
          16   0%                                                                                                                            textsec--ipvx-address-p
           5   0%                                                                                                                            split-string
           5   0%                                                                                                                          - seq-do
           4   0%                                                                                                                             mapc
          74   1%                                                                                                                         - url-generic-parse-url
          37   0%                                                                                                                          - #<compiled -0x1dfea4210cf1bf87>
           7   0%                                                                                                                           - kill-buffer
           6   0%                                                                                                                            - replace-buffer-in-windows
           1   0%                                                                                                                               unrecord-window-buffer
          14   0%                                                                                                                            generate-new-buffer
         194   3%                                                                                                                        - textsec-link-suspicious-p
         135   2%                                                                                                                         - url-generic-parse-url
          76   1%                                                                                                                          - #<compiled -0x1dfea5121584ff87>
          16   0%                                                                                                                           - kill-buffer
          15   0%                                                                                                                            - replace-buffer-in-windows
           4   0%                                                                                                                             - unrecord-window-buffer
           2   0%                                                                                                                                assq-delete-all
          23   0%                                                                                                                            generate-new-buffer
           5   0%                                                                                                                         - string-trim
           2   0%                                                                                                                            string-trim-right
           1   0%                                                                                                                            string-trim-left
           1   0%                                                                                                                         - textsec-domain-suspicious-p
           1   0%                                                                                                                          - textsec-ascii-confusable-p
           1   0%                                                                                                                           - textsec-restriction-level
           1   0%                                                                                                                            - textsec-covering-scripts
           1   0%                                                                                                                             - seq-difference
           1   0%                                                                                                                              - seq-reduce
           1   0%                                                                                                                               - seq-do
           1   0%                                                                                                                                - mapc
           1   0%                                                                                                                                 - #<compiled -0x1cedde8780de0b01>
           1   0%                                                                                                                                  - #<compiled -0x54da0d04063ff54>
           1   0%                                                                                                                                     seq-contains-p
          25   0%                                                                                                                        - cons
          15   0%                                                                                                                         - shr-expand-url
           8   0%                                                                                                                          - if
           6   0%                                                                                                                           - progn
           6   0%                                                                                                                            - setq
           6   0%                                                                                                                             - string-trim
           2   0%                                                                                                                                string-trim-left
           2   0%                                                                                                                                string-trim-right
           1   0%                                                                                                                             =
           4   0%                                                                                                                          - cond
           1   0%                                                                                                                             concat
           1   0%                                                                                                                             =
          22   0%                                                                                                                        - require
          21   0%                                                                                                                         - byte-code
          19   0%                                                                                                                          - require
          12   0%                                                                                                                           - byte-code
          12   0%                                                                                                                            - ucs-normalize-make-translation-table-from-alist
           2   0%                                                                                                                               make-translation-table-from-alist
           4   0%                                                                                                                           - load-with-code-conversion
           3   0%                                                                                                                              eval-buffer
           1   0%                                                                                                                            - hack-read-symbol-shorthands
           1   0%                                                                                                                               hack-local-variables--find-variables
           1   0%                                                                                                                         - require
           1   0%                                                                                                                            load-with-code-conversion
          18   0%                                                                                                                        - shr-expand-url
          11   0%                                                                                                                         - if
          10   0%                                                                                                                          - progn
          10   0%                                                                                                                           - setq
          10   0%                                                                                                                            - string-trim
           8   0%                                                                                                                               string-trim-right
           1   0%                                                                                                                            =
           5   0%                                                                                                                         - cond
           3   0%                                                                                                                          - or
           1   0%                                                                                                                             string-match-p
           1   0%                                                                                                                            =
           1   0%                                                                                                                            eq
         231   4%                                                                                                                    - shr-urlify
         152   2%                                                                                                                     - add-text-properties
         150   2%                                                                                                                      - list
         145   2%                                                                                                                       - let
          84   1%                                                                                                                        - url-generic-parse-url
          24   0%                                                                                                                         - #<compiled -0x1dfea5bf967ff787>
           3   0%                                                                                                                          - kill-buffer
           2   0%                                                                                                                           - replace-buffer-in-windows
           2   0%                                                                                                                            - unrecord-window-buffer
           1   0%                                                                                                                               assq-delete-all
          19   0%                                                                                                                         - or
          16   0%                                                                                                                          - condition-case
          16   0%                                                                                                                           - progn
          15   0%                                                                                                                            - decode-coding-string
          13   0%                                                                                                                               url-unhex-string
          13   0%                                                                                                                           generate-new-buffer
          19   0%                                                                                                                        - if
          19   0%                                                                                                                         - progn
          17   0%                                                                                                                          - progn
          14   0%                                                                                                                           - let*
          13   0%                                                                                                                            - aset
          10   0%                                                                                                                             - puny-encode-domain
           3   0%                                                                                                                              - progn
           3   0%                                                                                                                               - or
           3   0%                                                                                                                                - progn
           2   0%                                                                                                                                 - and
           1   0%                                                                                                                                    memq
           2   0%                                                                                                                           - or
           1   0%                                                                                                                            - progn
           1   0%                                                                                                                               and
           1   0%                                                                                                                          - or
           1   0%                                                                                                                             progn
           7   0%                                                                                                                        - setq
           1   0%                                                                                                                           url-recreate-url
          30   0%                                                                                                                     - funcall
          14   0%                                                                                                                      - eww--transform-url
          14   0%                                                                                                                       - if
          14   0%                                                                                                                        - progn
          14   0%                                                                                                                         - let
          14   0%                                                                                                                          - while
          13   0%                                                                                                                           - let
          12   0%                                                                                                                            - setq
          11   0%                                                                                                                             - funcall
          11   0%                                                                                                                              - eww-remove-tracking
          10   0%                                                                                                                                 replace-regexp-in-string
          14   0%                                                                                                                      - shr-expand-url
          12   0%                                                                                                                       - if
          10   0%                                                                                                                        - progn
           8   0%                                                                                                                         - setq
           8   0%                                                                                                                          - string-trim
           5   0%                                                                                                                             string-trim-right
           2   0%                                                                                                                       - cond
           1   0%                                                                                                                        - or
           1   0%                                                                                                                           string-match-p
          19   0%                                                                                                                     - shr-add-font
          16   0%                                                                                                                      - save-excursion
          14   0%                                                                                                                       - while
           5   0%                                                                                                                        - if
           4   0%                                                                                                                           <
           4   0%                                                                                                                        - add-face-text-property
           4   0%                                                                                                                           min
          12   0%                                                                                                                     - while
           8   0%                                                                                                                      - let
           5   0%                                                                                                                       - if
           1   0%                                                                                                                          put-text-property
           1   0%                                                                                                                         next-single-property-change
           8   0%                                                                                                                     - if
           7   0%                                                                                                                      - progn
           1   0%                                                                                                                         add-text-properties
           1   0%                                                                                                                        <
          80   1%                                                                                                                  - shr-generic
          79   1%                                                                                                                   - let
          78   1%                                                                                                                    - while
          74   1%                                                                                                                     - let
          74   1%                                                                                                                      - if
          67   1%                                                                                                                       - shr-insert
          64   1%                                                                                                                        - cond
          63   1%                                                                                                                         - let
          49   0%                                                                                                                          - let
          31   0%                                                                                                                           - save-restriction
          10   0%                                                                                                                            - shr--translate-insertion-chars
           8   0%                                                                                                                               while
           1   0%                                                                                                                               goto-char
           9   0%                                                                                                                              while
           6   0%                                                                                                                            - if
           2   0%                                                                                                                               progn
           1   0%                                                                                                                              goto-char
           4   0%                                                                                                                           - if
           4   0%                                                                                                                            - if
           4   0%                                                                                                                             - progn
           1   0%                                                                                                                                put-text-property
           8   0%                                                                                                                          - if
           4   0%                                                                                                                             progn
           3   0%                                                                                                                           - and
           3   0%                                                                                                                              string-match-p
           2   0%                                                                                                                        - if
           2   0%                                                                                                                         - and
           1   0%                                                                                                                            not
           1   0%                                                                                                                            get-text-property
           7   0%                                                                                                                       - shr-descend
           7   0%                                                                                                                        - let
           5   0%                                                                                                                         - if
           3   0%                                                                                                                          - or
           1   0%                                                                                                                           - equal
           1   0%                                                                                                                              cdr
           1   0%                                                                                                                          - cond
           1   0%                                                                                                                             funcall
           1   0%                                                                                                                         - intern
           1   0%                                                                                                                          - concat
           1   0%                                                                                                                             symbol-name
           1   0%                                                                                                                           cdr
           1   0%                                                                                                                  - cdr
           1   0%                                                                                                                     assq
           1   0%                                                                                                                  - let*
           1   0%                                                                                                                   - and
           1   0%                                                                                                                    - and
           1   0%                                                                                                                       not
          31   0%                                                                                                                - if
          28   0%                                                                                                                 - put-text-property
          28   0%                                                                                                                  - if
          14   0%                                                                                                                     mm-images-in-region-p
           2   0%                                                                                                               - eww-handle-link
           2   0%                                                                                                                - let*
           1   0%                                                                                                                   cdr
           1   0%                                                                                                              - eww-tag-meta
           1   0%                                                                                                               - if
           1   0%                                                                                                                  and
           2   0%                                                                                                            - or
           2   0%                                                                                                             - equal
           2   0%                                                                                                                cdr
           6   0%                                                                                                           - intern
           1   0%                                                                                                              concat
           1   0%                                                                                                             cdr
           4   0%                                                                                                         - shr-insert
           4   0%                                                                                                          - cond
           3   0%                                                                                                           - let
           2   0%                                                                                                            - let
           1   0%                                                                                                             - save-restriction
           1   0%                                                                                                                if
           3   0%                                                                                                   - let*
           2   0%                                                                                                    - and
           2   0%                                                                                                     - cdr
           2   0%                                                                                                        assq
           2   0%                                                                                                   - or
           1   0%                                                                                                      equal
         476   8%                                                                                                - unwind-protect
         351   6%                                                                                                 - progn
         266   4%                                                                                                  - if
         178   3%                                                                                                   - let
         130   2%                                                                                                    - shr-fill-lines
         130   2%                                                                                                     - if
         129   2%                                                                                                      - save-restriction
         123   2%                                                                                                       - if
         123   2%                                                                                                        - progn
         122   2%                                                                                                         - shr-fill-line
         122   2%                                                                                                          - let
         115   2%                                                                                                           - if
         114   2%                                                                                                            - progn
          94   1%                                                                                                             - shr-vertical-motion
          94   1%                                                                                                              - if
           1   0%                                                                                                                 if
          18   0%                                                                                                             - while
          12   0%                                                                                                              - shr-vertical-motion
          12   0%                                                                                                               - if
           1   0%                                                                                                                  vertical-motion
           6   0%                                                                                                              - if
           5   0%                                                                                                               - or
           5   0%                                                                                                                - not
           1   0%                                                                                                                   pixel-fill-find-fill-point
           1   0%                                                                                                               - progn
           1   0%                                                                                                                  delete-char
           2   0%                                                                                                               if
           2   0%                                                                                                           - let
           1   0%                                                                                                            - if
           1   0%                                                                                                             - progn
           1   0%                                                                                                                put-text-property
           1   0%                                                                                                           - or
           1   0%                                                                                                              get-text-property
           3   0%                                                                                                       - while
           2   0%                                                                                                          setq
           1   0%                                                                                                        - if
           1   0%                                                                                                         - progn
           1   0%                                                                                                          - shr-fill-line
           1   0%                                                                                                           - let
           1   0%                                                                                                            - if
           1   0%                                                                                                             - progn
           1   0%                                                                                                              - shr-vertical-motion
           1   0%                                                                                                                 if
          48   0%                                                                                                    - setq
          47   0%                                                                                                     - shr-pixel-buffer-width
          47   0%                                                                                                      - if
          47   0%                                                                                                       - if
          44   0%                                                                                                          car
          87   1%                                                                                                   - setq
          85   1%                                                                                                    - or
          84   1%                                                                                                     - let
          80   1%                                                                                                      - max
          70   1%                                                                                                       - shr-pixel-buffer-width
          70   1%                                                                                                        - if
          70   1%                                                                                                         - if
          69   1%                                                                                                            car
           9   0%                                                                                                       - shr-dom-max-natural-width
           9   0%                                                                                                        - if
           6   0%                                                                                                         - let
           5   0%                                                                                                          - while
           4   0%                                                                                                           - let
           3   0%                                                                                                            - if
           3   0%                                                                                                             - setq
           3   0%                                                                                                              - max
           3   0%                                                                                                               - shr-dom-max-natural-width
           3   0%                                                                                                                - if
           3   0%                                                                                                                 - let
           3   0%                                                                                                                  - while
           3   0%                                                                                                                   - let
           1   0%                                                                                                                      setq
           2   0%                                                                                                           eq
           2   0%                                                                                                        dom-set-attribute
           1   0%                                                                                                     and
          12   0%                                                                                                  - set-window-buffer
          10   0%                                                                                                   - record-window-buffer
           2   0%                                                                                                      push-window-buffer-onto-prev
          59   1%                                                                                                 - set-window-configuration
          56   0%                                                                                                  - frame-windows-min-size
          53   0%                                                                                                   - window-min-size
          36   0%                                                                                                    - window--min-size-1
          16   0%                                                                                                     - window-size-fixed-p
           7   0%                                                                                                      - window--size-fixed-1
           3   0%                                                                                                       - window--preserve-size
           3   0%                                                                                                          window-preserved-size
           2   0%                                                                                                         window-child
           1   0%                                                                                                        window-normalize-window
           1   0%                                                                                                       window-child
           1   0%                                                                                                     - window-safe-min-size
           1   0%                                                                                                        window-normalize-window
          23   0%                                                                                               - list
          13   0%                                                                                                  split-string
           2   0%                                                                                                - if
           2   0%                                                                                                 - cdr
           2   0%                                                                                                    assq
           1   0%                                                                                                  count-lines
           5   0%                                                                                               - shr--set-target-ids
           5   0%                                                                                                - if
           3   0%                                                                                                 - let
           2   0%                                                                                                    seq-group-by
           4   0%                                                                                               - cdr
           4   0%                                                                                                  assq
           1   0%                                                                                               - delete-region
           1   0%                                                                                                  progn
          37   0%                                                                                             - and
          11   0%                                                                                              - kill-buffer
          10   0%                                                                                               - replace-buffer-in-windows
           3   0%                                                                                                - unrecord-window-buffer
           3   0%                                                                                                 - assq-delete-all
           1   0%                                                                                                    assoc-delete-all
          19   0%                                                                                             generate-new-buffer
           2   0%                                                                                           dom-set-attribute
          38   0%                                                                                        - and
          35   0%                                                                                         - let
          34   0%                                                                                          - let
          34   0%                                                                                           - while
          32   0%                                                                                            - let
          24   0%                                                                                             - let
          19   0%                                                                                              - if
           5   0%                                                                                               - progn
           5   0%                                                                                                - let
           3   0%                                                                                                 - if
           2   0%                                                                                                    and
           2   0%                                                                                                   string-to-number
           1   0%                                                                                                symbol-name
           1   0%                                                                                               setq
          25   0%                                                                                         intern
           3   0%                                                                                     - if
           1   0%                                                                                        and
           1   0%                                                                                      - if
           1   0%                                                                                       - setq
           1   0%                                                                                          cons
           2   0%                                                                                   - setq
           1   0%                                                                                      cdr
           1   0%                                                                                     >=
           2   0%                                                                                  - let*
           2   0%                                                                                   - and
           2   0%                                                                                    - cdr
           1   0%                                                                                       assq
           1   0%                                                                                    setq
           1   0%                                                                                    progn
           1   0%                                                                                 - and
           1   0%                                                                                    not
           1   0%                                                                                - setq
           1   0%                                                                                   if
         175   3%                                                                   - shr-insert-table
         158   2%                                                                    - let*
         158   2%                                                                     - let
         158   2%                                                                      - while
         158   2%                                                                       - let
         158   2%                                                                        - let
         158   2%                                                                         - let
         155   2%                                                                          - while
         154   2%                                                                           - let
         126   2%                                                                            - if
         125   2%                                                                             - progn
         119   2%                                                                              - let
         113   2%                                                                               - let
         111   1%                                                                                - while
         111   1%                                                                                 - let
         107   1%                                                                                  - let
           5   0%                                                                                   - and
           4   0%                                                                                    - shr-face-background
           4   0%                                                                                     - and
           4   0%                                                                                      - or
           3   0%                                                                                       - let
           3   0%                                                                                        - let
           3   0%                                                                                         - while
           2   0%                                                                                          - let
           1   0%                                                                                             setq
           4   0%                                                                                   - shr-colorize-region
           1   0%                                                                                    - if
           1   0%                                                                                       and
           1   0%                                                                                      1-
           2   0%                                                                                     propertize
           2   0%                                                                                  -
           4   0%                                                                               - while
           3   0%                                                                                - let
           2   0%                                                                                 - if
           1   0%                                                                                    progn
           1   0%                                                                              - shr-indent
           1   0%                                                                               - if
           1   0%                                                                                - progn
           1   0%                                                                                   if
           1   0%                                                                               >
           3   0%                                                                          - let
           3   0%                                                                             while
          17   0%                                                                    - shr-make-table
          17   0%                                                                     - or
          17   0%                                                                      - let
          17   0%                                                                       - shr-make-table-1
          17   0%                                                                        - let
          17   0%                                                                         - let
          17   0%                                                                          - while
          17   0%                                                                           - let
          16   0%                                                                            - if
          14   0%                                                                             - progn
          13   0%                                                                              - let
          12   0%                                                                               - while
           8   0%                                                                                - if
           7   0%                                                                                 - progn
           2   0%                                                                                    progn
           2   0%                                                                                    if
           1   0%                                                                                    setq
           1   0%                                                                                   and
           3   0%                                                                                - setq
           3   0%                                                                                 - if
           1   0%                                                                                    =
           1   0%                                                                                    car-safe
           2   0%                                                                               eq
          16   0%                                                                   - shr-column-specs
          16   0%                                                                    - let
          10   0%                                                                     - make-vector
          10   0%                                                                      - shr-max-columns
          10   0%                                                                       - let
          10   0%                                                                        - let
          10   0%                                                                         - while
           9   0%                                                                          - let
           8   0%                                                                           - if
           8   0%                                                                            - progn
           8   0%                                                                             - let
           6   0%                                                                              - while
           6   0%                                                                               - let
           4   0%                                                                                - if
           3   0%                                                                                 - progn
           2   0%                                                                                  - let*
           1   0%                                                                                     and
           1   0%                                                                                 - and
           1   0%                                                                                    memq
           6   0%                                                                     - let
           6   0%                                                                      - while
           6   0%                                                                       - let
           6   0%                                                                        - if
           6   0%                                                                         - progn
           6   0%                                                                          - let
           6   0%                                                                           - let
           5   0%                                                                            - while
           3   0%                                                                             - let
           2   0%                                                                              - if
           1   0%                                                                                 memq
           1   0%                                                                               - progn
           1   0%                                                                                - let
           1   0%                                                                                 - cdr
           1   0%                                                                                    assq
           8   0%                                                                   - shr-table-widths
           8   0%                                                                    - let*
           8   0%                                                                     - let
           8   0%                                                                      - while
           8   0%                                                                       - let
           7   0%                                                                        - let
           5   0%                                                                         - let
           5   0%                                                                          - while
           1   0%                                                                             let
           3   0%                                                                   - let*
           3   0%                                                                    - while
           2   0%                                                                     - setq
           1   0%                                                                      - cons
           1   0%                                                                         mapcar
           3   0%                                                                 - shr--fix-table
           3   0%                                                                  - let*
           3   0%                                                                   - dom-non-text-children
           3   0%                                                                    - shr--fix-tbody
           2   0%                                                                     - shr-table-body
           2   0%                                                                      - let
           2   0%                                                                       - seq-filter
           1   0%                                                                        - function
           1   0%                                                                         - cconv-make-interpreted-closure
           1   0%                                                                          - cconv-fv
           1   0%                                                                           - cconv-analyze-form
           1   0%                                                                            - cconv--analyze-function
           1   0%                                                                             - cconv-analyze-form
           1   0%                                                                                #<compiled -0xdb6d8de38021a78>
           1   0%                                                                        - seq-map
           1   0%                                                                         - apply
           1   0%                                                                          - #<compiled 0x184c52027f5d6bf4>
           1   0%                                                                           - mapcar
           1   0%                                                                              #<compiled 0x91ffdf39c9e7756>
           1   0%                                                                     - nconc
           1   0%                                                                      - let*
           1   0%                                                                       - while
           1   0%                                                                          setq
          23   0%                                                               - let*
          23   0%                                                                - if
          23   0%                                                                 - progn
          23   0%                                                                  - let
          23   0%                                                                   - shr-collect-extra-strings-in-table
          23   0%                                                                    - let*
          23   0%                                                                     - while
          23   0%                                                                      - if
          23   0%                                                                       - progn
          23   0%                                                                        - setq
          23   0%                                                                         - nconc
          23   0%                                                                          - reverse
          23   0%                                                                           - shr-collect-extra-strings-in-table
          21   0%                                                                            - let*
          20   0%                                                                             - while
          15   0%                                                                              - if
          15   0%                                                                               - progn
          15   0%                                                                                - setq
          15   0%                                                                                 - nconc
          14   0%                                                                                  - reverse
          14   0%                                                                                   - shr-collect-extra-strings-in-table
          11   0%                                                                                    - let*
          10   0%                                                                                     - while
           8   0%                                                                                      - if
           8   0%                                                                                       - if
           8   0%                                                                                        - progn
           7   0%                                                                                         - if
           5   0%                                                                                          - if
           4   0%                                                                                           - if
           3   0%                                                                                            - if
           1   0%                                                                                             - if
           1   0%                                                                                                memq
           1   0%                                                                                            memq
           1   0%                                                                                        setq
           1   0%                                                                                setq
           1   0%                                                             - shr-ensure-paragraph
           1   0%                                                              - if
           1   0%                                                               - let
           1   0%                                                                - cond
           1   0%                                                                   and
          62   1%                                                            - shr-tag-dl
          61   1%                                                             - shr-generic
          61   1%                                                              - let
          61   1%                                                               - while
          61   1%                                                                - let
          61   1%                                                                 - if
          46   0%                                                                  - shr-descend
          46   0%                                                                   - let
          46   0%                                                                    - if
          46   0%                                                                     - cond
          46   0%                                                                      - funcall
          33   0%                                                                       - shr-tag-dt
          25   0%                                                                        - shr-generic
          25   0%                                                                         - let
          25   0%                                                                          - while
          23   0%                                                                           - let
          23   0%                                                                            - if
          18   0%                                                                             - shr-descend
          16   0%                                                                              - let
          15   0%                                                                               - if
          13   0%                                                                                - cond
          13   0%                                                                                 - funcall
          13   0%                                                                                  - shr-tag-span
          13   0%                                                                                   - shr-generic
          13   0%                                                                                    - let
          13   0%                                                                                     - while
          13   0%                                                                                      - let
          12   0%                                                                                       - if
           7   0%                                                                                        - shr-descend
           6   0%                                                                                         - let
           6   0%                                                                                          - if
           4   0%                                                                                           - cond
           4   0%                                                                                            - funcall
           4   0%                                                                                             - eww-tag-a
           3   0%                                                                                              - let
           2   0%                                                                                               - shr-tag-a
           2   0%                                                                                                  let
           1   0%                                                                                                 if
           1   0%                                                                                                eww-handle-link
           1   0%                                                                                           - let*
           1   0%                                                                                            - and
           1   0%                                                                                             - cdr
           1   0%                                                                                                assq
           5   0%                                                                                        - shr-insert
           5   0%                                                                                         - cond
           5   0%                                                                                          - let
           4   0%                                                                                           - let
           2   0%                                                                                            - save-restriction
           1   0%                                                                                             - shr--translate-insertion-chars
           1   0%                                                                                                while
           1   0%                                                                                             - if
           1   0%                                                                                                progn
           1   0%                                                                                            - if
           1   0%                                                                                             - if
           1   0%                                                                                                progn
           1   0%                                                                                           - if
           1   0%                                                                                              progn
           1   0%                                                                                - let*
           1   0%                                                                                 - and
           1   0%                                                                                    cdr
           1   0%                                                                                  or
           1   0%                                                                               - cdr
           1   0%                                                                                  assq
           5   0%                                                                             - shr-insert
           5   0%                                                                              - cond
           5   0%                                                                               - let
           5   0%                                                                                - let
           3   0%                                                                                 - save-restriction
           2   0%                                                                                    while
           1   0%                                                                                  - if
           1   0%                                                                                     progn
           7   0%                                                                        - shr-ensure-newline
           7   0%                                                                         - if
           7   0%                                                                          - let
           4   0%                                                                           - if
           1   0%                                                                            - or
           1   0%                                                                               =
           3   0%                                                                             get-text-property
          13   0%                                                                       - shr-tag-dd
          12   0%                                                                        - let
          11   0%                                                                         - shr-generic
          11   0%                                                                          - let
          11   0%                                                                           - while
          11   0%                                                                            - let
          11   0%                                                                             - if
           7   0%                                                                              - shr-descend
           6   0%                                                                               - let
           2   0%                                                                                - if
           1   0%                                                                                 - cond
           1   0%                                                                                  - funcall
           1   0%                                                                                     shr-tag-p
           1   0%                                                                                 - let*
           1   0%                                                                                  - and
           1   0%                                                                                     cdr
           2   0%                                                                                - cdr
           1   0%                                                                                   assq
           1   0%                                                                                  intern
           3   0%                                                                              - shr-insert
           3   0%                                                                               - cond
           2   0%                                                                                - let
           1   0%                                                                                 - let
           1   0%                                                                                  - save-restriction
           1   0%                                                                                     shr--translate-insertion-chars
           1   0%                                                                        - shr-ensure-newline
           1   0%                                                                           if
          15   0%                                                                  - shr-insert
          15   0%                                                                   - cond
          15   0%                                                                    - let
          13   0%                                                                     - let
           7   0%                                                                      - save-restriction
           6   0%                                                                       - if
           4   0%                                                                          progn
           1   0%                                                                       - shr--translate-insertion-chars
           1   0%                                                                          while
           1   0%                                                                        if
           1   0%                                                                     - if
           1   0%                                                                      - and
           1   0%                                                                         string-match-p
           1   0%                                                             - shr-ensure-paragraph
           1   0%                                                              - if
           1   0%                                                               - let
           1   0%                                                                - cond
           1   0%                                                                   and
           4   0%                                                            - shr-tag-p
           4   0%                                                             - shr-ensure-paragraph
           4   0%                                                              - if
           4   0%                                                               - let
           2   0%                                                                  cond
           2   0%                                                                  get-text-property
           3   0%                                                            - eww-tag-a
           3   0%                                                             - let
           2   0%                                                              - if
           2   0%                                                               - put-text-property
           2   0%                                                                  if
           1   0%                                                                shr-tag-a
           3   0%                                                            - shr-tag-sup
           3   0%                                                             - let
           3   0%                                                              - shr-generic
           3   0%                                                               - let
           3   0%                                                                - while
           2   0%                                                                 - let
           2   0%                                                                  - if
           2   0%                                                                   - shr-insert
           2   0%                                                                    - cond
           2   0%                                                                     - let
           2   0%                                                                        let
          30   0%                                                           - shr-generic
          30   0%                                                            - let
          30   0%                                                             - while
          30   0%                                                              - let
          30   0%                                                               - if
          29   0%                                                                - shr-insert
          29   0%                                                                 - cond
          28   0%                                                                  - let
          25   0%                                                                   - let
           9   0%                                                                    - save-restriction
           3   0%                                                                     - shr--translate-insertion-chars
           2   0%                                                                        while
           3   0%                                                                       while
           1   0%                                                                       if
           7   0%                                                                    - if
           5   0%                                                                     - if
           5   0%                                                                      - progn
           2   0%                                                                       - shr-mark-fill
           2   0%                                                                        - if
           1   0%                                                                           progn
           1   0%                                                                           and
           1   0%                                                                         put-text-property
           3   0%                                                                   - if
           3   0%                                                                    - and
           2   0%                                                                       string-match-p
           1   0%                                                                - shr-descend
           1   0%                                                                 - let
           1   0%                                                                  - if
           1   0%                                                                   - cond
           1   0%                                                                      shr-generic
           1   0%                                                  - let
           1   0%                                                     while
         197   3%                                             - shr-tag-div
         197   3%                                              - let
         197   3%                                               - if
         197   3%                                                - shr-generic
         197   3%                                                 - let
         197   3%                                                  - while
         197   3%                                                   - let
         197   3%                                                    - if
         162   2%                                                     - shr-descend
         160   2%                                                      - let
         153   2%                                                       - if
         151   2%                                                        - cond
         150   2%                                                         - funcall
         141   2%                                                          - shr-tag-p
         125   2%                                                           - shr-generic
         125   2%                                                            - let
         125   2%                                                             - while
         123   2%                                                              - let
         121   2%                                                               - if
          99   1%                                                                - shr-insert
          98   1%                                                                 - cond
          98   1%                                                                  - let
          87   1%                                                                   - let
          67   1%                                                                    - save-restriction
          46   0%                                                                       while
           9   0%                                                                     - shr--translate-insertion-chars
           6   0%                                                                        while
           2   0%                                                                        goto-char
           7   0%                                                                     - if
           3   0%                                                                        progn
           7   0%                                                                    - if
           4   0%                                                                     - if
           4   0%                                                                      - progn
           1   0%                                                                         put-text-property
           1   0%                                                                       =
           9   0%                                                                   - if
           5   0%                                                                      progn
           3   0%                                                                    - and
           3   0%                                                                       string-match-p
          20   0%                                                                - shr-descend
          17   0%                                                                 - let
          11   0%                                                                  - if
          10   0%                                                                   - cond
           9   0%                                                                    - funcall
           8   0%                                                                     - eww-tag-a
           4   0%                                                                      - let
           3   0%                                                                       - if
           3   0%                                                                        - put-text-property
           3   0%                                                                           if
           1   0%                                                                       - shr-tag-a
           1   0%                                                                          let
           3   0%                                                                      - eww-handle-link
           1   0%                                                                       - let*
           1   0%                                                                        - assoc
           1   0%                                                                           if
           4   0%                                                                  - cdr
           2   0%                                                                     assq
           1   0%                                                                  - intern
           1   0%                                                                   - concat
           1   0%                                                                      symbol-name
          15   0%                                                           - shr-ensure-paragraph
          15   0%                                                            - if
          14   0%                                                             - let
          14   0%                                                              - cond
           2   0%                                                               - save-excursion
           2   0%                                                                  and
           2   0%                                                               - and
           1   0%                                                                  save-excursion
           5   0%                                                          - shr-tag-div
           5   0%                                                           - let
           5   0%                                                            - if
           2   0%                                                             - shr-generic
           2   0%                                                              - let
           2   0%                                                               - while
           1   0%                                                                  let
           2   0%                                                             - shr-ensure-newline
           2   0%                                                              - if
           2   0%                                                               - let
           1   0%                                                                - if
           1   0%                                                                 - or
           1   0%                                                                    =
           2   0%                                                          - shr-tag-hr
           1   0%                                                           - shr-ensure-newline
           1   0%                                                            - if
           1   0%                                                               let
           1   0%                                                          - shr-tag-pre
           1   0%                                                           - let
           1   0%                                                            - shr-generic
           1   0%                                                             - let
           1   0%                                                                while
           1   0%                                                            eww-tag-a
           1   0%                                                        - let*
           1   0%                                                         - if
           1   0%                                                          - setq
           1   0%                                                           - cons
           1   0%                                                              cons
           5   0%                                                       - cdr
           3   0%                                                          assq
           1   0%                                                       - intern
           1   0%                                                        - concat
           1   0%                                                           symbol-name
          32   0%                                                     - shr-insert
          31   0%                                                      - cond
          31   0%                                                       - let
          30   0%                                                        - let
          16   0%                                                         - save-restriction
           7   0%                                                          - if
           6   0%                                                             progn
           3   0%                                                            while
           2   0%                                                          - shr--translate-insertion-chars
           1   0%                                                             while
           1   0%                                                      - if
           1   0%                                                         and
          20   0%                                             - shr-tag-code
          20   0%                                              - let
          20   0%                                               - shr-generic
          20   0%                                                - let
          20   0%                                                 - while
          20   0%                                                  - let
          20   0%                                                   - if
          20   0%                                                    - shr-insert
          18   0%                                                     - cond
          18   0%                                                      - let
          17   0%                                                       - let
           7   0%                                                        - if
           7   0%                                                         - if
           7   0%                                                          - progn
           6   0%                                                           - shr-mark-fill
           6   0%                                                            - if
           4   0%                                                             - progn
           1   0%                                                                put-text-property
           1   0%                                                               and
           6   0%                                                        - save-restriction
           3   0%                                                           while
           1   0%                                                           if
           1   0%                                                     - if
           1   0%                                                        and
          17   0%                                             - shr-tag-ul
          17   0%                                              - let
          17   0%                                               - shr-generic
          17   0%                                                - let
          17   0%                                                 - while
          17   0%                                                  - let
          17   0%                                                   - if
          14   0%                                                    - shr-descend
          14   0%                                                     - let
          14   0%                                                      - if
          14   0%                                                       - cond
          14   0%                                                        - funcall
          14   0%                                                         - shr-tag-li
          13   0%                                                          - let
          13   0%                                                           - let*
          12   0%                                                            - let
          10   0%                                                             - shr-generic
          10   0%                                                              - let
          10   0%                                                               - while
          10   0%                                                                - let
           9   0%                                                                 - if
           8   0%                                                                  - shr-insert
           8   0%                                                                   - cond
           8   0%                                                                    - let
           7   0%                                                                     - let
           4   0%                                                                      - save-restriction
           2   0%                                                                         while
           1   0%                                                                       - shr--translate-insertion-chars
           1   0%                                                                          while
           1   0%                                                                     - if
           1   0%                                                                        progn
           1   0%                                                                  - shr-descend
           1   0%                                                                   - let
           1   0%                                                                      if
           1   0%                                                            if
           3   0%                                                    - shr-insert
           3   0%                                                     - cond
           3   0%                                                      - let
           2   0%                                                       - let
           1   0%                                                        - save-restriction
           1   0%                                                           while
           1   0%                                                       - if
           1   0%                                                        - and
           1   0%                                                           string-match-p
           1   0%                                             - eww-tag-title
           1   0%                                              - eww--after-page-change
           1   0%                                               - eww-update-header-line-format
           1   0%                                                - setq
           1   0%                                                 - and
           1   0%                                                  - let
           1   0%                                                   - if
           1   0%                                                    - progn
           1   0%                                                     - let*
           1   0%                                                      - cond
           1   0%                                                       - >
           1   0%                                                        - +
           1   0%                                                           string-pixel-width
           1   0%                                             - shr-tag-h3
           1   0%                                              - shr-heading
           1   0%                                               - apply
           1   0%                                                - shr-fontize-dom
           1   0%                                                 - let
           1   0%                                                  - let
           1   0%                                                   - while
           1   0%                                                    - let
           1   0%                                                     - shr-add-font
           1   0%                                                      - save-excursion
           1   0%                                                       - while
           1   0%                                                        - if
           1   0%                                                           progn
           1   0%                                             - shr-tag-h4
           1   0%                                              - shr-heading
           1   0%                                               - apply
           1   0%                                                - shr-fontize-dom
           1   0%                                                 - let
           1   0%                                                  - let
           1   0%                                                   - while
           1   0%                                                    - let
           1   0%                                                     - shr-add-font
           1   0%                                                      - save-excursion
           1   0%                                                       - while
           1   0%                                                        - add-face-text-property
           1   0%                                                           min
           1   0%                                             - shr-tag-em
           1   0%                                              - shr-fontize-dom
           1   0%                                               - let
           1   0%                                                - shr-generic
           1   0%                                                 - let
           1   0%                                                  - while
           1   0%                                                   - let
           1   0%                                                    - if
           1   0%                                                     - shr-insert
           1   0%                                                      - cond
           1   0%                                                       - let
           1   0%                                                        - let
           1   0%                                                         - save-restriction
           1   0%                                                            while
           1   0%                                             - shr-tag-b
           1   0%                                              - shr-fontize-dom
           1   0%                                               - let
           1   0%                                                - let
           1   0%                                                 - while
           1   0%                                                  - let
           1   0%                                                   - shr-add-font
           1   0%                                                    - save-excursion
           1   0%                                                       while
           1   0%                                          and
           7   0%                             - shr-indent
           7   0%                              - if
           7   0%                               - progn
           7   0%                                  if
         307   5%                            - if
         306   5%                             - progn
         158   2%                              - shr-vertical-motion
         158   2%                               - if
           2   0%                                - vertical-motion
           2   0%                                 - cons
           1   0%                                    /
         147   2%                              - while
         108   1%                               - shr-vertical-motion
         108   1%                                - if
           1   0%                                   if
          21   0%                               - let
           9   0%                                - shr-indent
           9   0%                                 - if
           9   0%                                  - progn
           9   0%                                   - if
           2   0%                                      put-text-property
           2   0%                                - if
           2   0%                                 - progn
           1   0%                                  - put-text-property
           1   0%                                   - shr-face-background
           1   0%                                    - and
           1   0%                                     - or
           1   0%                                      - let
           1   0%                                         let
          15   0%                               - if
          12   0%                                - progn
           1   0%                                   delete-char
           3   0%                                - or
           2   0%                                   not
           1   0%                                   =
           1   0%                                 setq
           1   0%                              or
           4   0%                          setq
          51   0%                    - shr--set-target-ids
          51   0%                     - if
          51   0%                      - let
          50   0%                       - seq-group-by
          50   0%                        - seq-reduce
          50   0%                         - seq-do
          50   0%                          - mapc
          50   0%                           - #<compiled 0x1f6b909dc3b4177e>
          50   0%                              #<compiled -0x59cbb93c5c11f35>
           1   0%                       - while
           1   0%                        - let
           1   0%                           let
           3   0%             - eww-size-text-inputs
           3   0%              - let
           3   0%               - while
           3   0%                - if
           3   0%                 - or
           3   0%                    setq
          68   1%            - or
          68   1%             - list
          68   1%              - progn
          20   0%               - eww--preprocess-html
          20   0%                - save-excursion
          20   0%                 - save-restriction
          20   0%                  - let
          20   0%                     while
          19   0%               - save-excursion
          19   0%                  while
          10   0%                 condition-case
           1   0%   - url-http-parse-headers
           1   0%      url-handle-content-transfer-encoding
           9   0% + command-execute
           4   0% + nsm-verify-connection