Subject: Re: bug#54657: 29.0.50; 100% CPU usage with eww on https://blogsurf.io/

From: Eli Zaretskii <[email-masked]>
Date: Fri, 01 Apr 2022 09:05:02 +0300

> Date: Thu, 31 Mar 2022 21:49:40 +0200
> From: dal-blazej--- via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> I was surprised to see that particular site with eww leads to 100% CPU
> usage for 2/3 minutes.
> 
> See profiler output below :
> 
> ---------- CPU
>      83,835,054  84% - url-http-generic-filter
>      83,687,707  84%  - url-http-content-length-after-change-function
>      82,024,107  82%   - url-http-activate-callback
>      82,022,955  82%    - eww-render
>      55,943,666  56%     - eww-display-html
>      30,476,531  30%      - funcall-with-delayed-message
>      30,476,531  30%       + #<compiled 0x6f61fe78c524dc6>

Type 'v' to see the page's source, and you will immediately understand
why.  99% of that page is a huge JS script that is basically a single
humongous line whose length is 12MB.  Even Less chokes on this page,
just showing its end on the screen.

IOW, IMO this is just another instance of the well-known problem in
the display engine with very long lines.

Maybe EWW could be smarter when displaying pages with JS scripts, but
how many pages out there have something similar?