Big lag when scrolling

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
badnick
Astronaut
Astronaut
Posts: 670
Joined: 2017-03-23, 19:56

Big lag when scrolling

Unread post by badnick » 2017-11-03, 20:59

This page is very sluggish and has high CPU usage when scrolling:
http://inktank.fi/the-17-most-wonderful ... -internet/
Same behavior for PM-portable/unstable version[(27.7.0a1 (64-bit) (2017-11-02)]
I tested on Edge/Opera/Firefox and there is no issue.

Win 10/64
PM 27.5.1/64
Windows 10 pro /64 (version 1809)
PM last/64

van p
Astronaut
Astronaut
Posts: 592
Joined: 2015-11-19, 07:15
Location: Cincinnati, OH, U.S.A.

Re: Big lag when scrolling

Unread post by van p » 2017-11-05, 04:09

I get the same results in my older version of Pale Moon. It works fine in Cyberfox and Waterfox.
Windows 10 Pro x64 v22H2 8GB i5-4570|Pale Moon v33.0.1 x64

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Big lag when scrolling

Unread post by adesh » 2017-11-05, 08:04

Yes, the page is really sluggish on scrolling. Using 27.5.1 ver on 32-bit Linux.

dark_moon

Re: Big lag when scrolling

Unread post by dark_moon » 2017-11-05, 10:01

Can confirm that with Win7 x64
Even without allow scripts

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Big lag when scrolling

Unread post by Moonchild » 2017-11-05, 10:47

The problem is their page background image, a very large dimension SVG (2200x2800 px) - because of its size, we don't cache it in its rendered state (an optimization introduced in 27.4.0) since it would make the surface cache mostly pointless for other images on the same page if we'd just allow any size image to dominate the surface cache. I can tweak the size limits some, but I'd still not want to allow > 2000x2000 px dimensions there so it wouldn't solve this site's problem.

This lack of caching results in having to re-draw and re-render the SVG image with every frame (because it's a background put on the html element itself and by definition out-of-flow as a result) which is very slow (also because on top, a gradient is overlaid for a color effect). Even when cached this would still be expensive to use.

This is a design issue on the website. Using a PNG image instead would prevent this problem, and the PNG image would even be half the size of the SVG, to boot. I've sent the website owners an e-mail because this is more a matter of evangelism for proper design than it is a technical limitation of Pale Moon.

Issue #1446 deals with this.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
badnick
Astronaut
Astronaut
Posts: 670
Joined: 2017-03-23, 19:56

Re: Big lag when scrolling

Unread post by badnick » 2017-11-05, 11:20

Moonchild wrote:This is a design issue on the website. Using a PNG image instead would prevent this problem, and the PNG image would even be half the size of the SVG, to boot. I've sent the website owners an e-mail because this is more a matter of evangelism for proper design than it is a technical limitation of Pale Moon.
At same given rezolution .PNG is smaller than SVG?
Windows 10 pro /64 (version 1809)
PM last/64

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35481
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Big lag when scrolling

Unread post by Moonchild » 2017-11-05, 11:49

badnick wrote:At same given rezolution .PNG is smaller than SVG?
In this case, Yes.
SVG's file size depends directly on the complexity of what is being drawn and the vector point resolution of the drawing (how "accurate" curves and point-to-point lines are being defined). In the case of this background image, you're looking at 425KB of path definitions.
PNG's file size depends directly on the complexity of the resulting bitmap image and how compressible it is. In this case, it being monochrome with large areas of solid color, it compresses well, resulting in a PNG of ~200KB (without extensive optimization, even; I can probably shrink it further).
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked