OpenGL and Native GL Performance Boost in Palemoon

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.
j19861986

OpenGL and Native GL Performance Boost in Palemoon

Unread post by j19861986 » 2012-02-20, 14:56

I have just found out that the OpenGL mode and Native GL gives performance increase in Peacekeeper... :thumbup:
I suggest you look at that, and maybe include it - in future of Pale Moon builds...
(I have 9600m GT GFX, Core 2 Duo and 4 gigs ram, dunno if onboard GFX can do also better performance)
You can test it out, hope you guys can Make it default if it gets all-type-win-pc better performance
All you have to do is in "about:config":
"layers.prefer-opengl" to be true
and
"webgl.prefer-native-gl" to be true

It made my performance better than Firefox 10, and from about 1250 points, to 1327
Tested on Pale Moon 9.1

User avatar
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by satrow » 2012-02-20, 15:42

That's very interesting and something which has been a topic with the beta testers and the developer; unfortunately, most of us have ATI cards, which appear to give worse results with Peacekeeper when your about:config mods are enabled. Those mods were originally the default during beta testing, until it was discovered that it caused a big CPU% hike and lower performance in Peacekeeper (and some other tests). The decision was therefore made to drop to the 'safe' setting - which is also the Firefox default (or it was back when we were working through this issue).

There is a new WHQL driver due for release by AMD/ATI very soon now, I'll certainly run some fresh tests once I've installed that (I may even run a quick check again a little later). It's also possible that I have a bug somewhere in my graphics subsystem, as it was my machine that seemed to be the most obviously affected by it.

<standing by for comments from Moonchild ... >

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

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by Moonchild » 2012-02-21, 13:38

it seems the ATI problem (which is a large chunk of the user base) still exists at the moment. I'd prefer to have Pale Moon use native OpenGL since it -is- faster than going through a wrapper, but if the drawback is high CPU usage and sluggish performance, I'll leave the defaults as they are.
If the AMD/ATI drivers are updated to overcome this problem, I'd be more than happy to switch Pale Moon back to native OpenGL, which is the more efficient mode of operation. Consider not using native OpenGL a "live workaround" to keep the experience for the average user as smooth as possible.

Also, with the work done on the graphics back-end for v11, this problem may also be mitigated - I'll certainly make it a test cycle point to check. *hint hint @ Cymroly*
"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

megaman

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by megaman » 2012-02-21, 14:49

What I am wondering is, "What do we do that requires OpenGL that we do normally?"
If we come across less situations that involve OpenGL, we might not need to worry about it and remain as is with Native.
I do hope that the newer drivers provide a solution. Well, at least we got the perspective from an Nvidia user.

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

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by Moonchild » 2012-02-21, 15:28

Layers are used extensively in hardware accelerated drawing of complex pages. So it would definitely be good to enable native mode if this no longer poses an issue. Native has always been notably faster on NV cards than using the DirectX wrapper.
"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
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by satrow » 2012-02-21, 23:45

Hints taken, some Peacekeeping done from 4 browser versions and a quick splash a WebGL water tank in PM 9.2:

Verdict - layers.prefer-opengl true gives a significant performance increase (or at least, enables much more CPU% to be off-loaded to GPU). It also has some positive effect on the feel and performance of the spheres test but not enough to stop the high kernel CPU% usage, still in the ballpark of 12-26/30%, I'd guess.
I set the following in all browsers:
"layers.prefer-opengl" to be true
"webgl.prefer-native-gl" to be true
"webgl.force-enabled" to be true
The biggest TaskMan difference when I threw PM 9.2x64 into the mix was that it off-loaded significantly less to the GPU (or that the CPU/kernel worked harder).

http://peacekeeper.futuremark.com/results?key=4y07

I feel this setup makes a good compromise, even the WebGL ball in a pool looked halfway good.

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

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by Moonchild » 2012-02-22, 08:35

Well, as long as the high CPU usage problem is not addressed with OpenGL enabled on ATI cards, I'll keep the defaults as they are, regardless of better benchmark scores. Considering layers would cause a large load on CPU in that case, it's not just impacting the corner scenario of actually using WebGL (for something more than gadgets) but overall browsing - so I want to remain cautious about this setting and only enable it if there is no clear load issue anymore.

On that note though, I'm thinking of expanding the web installer to make a more tailored install based on people's individual systems - including making some pref entries depending on the hardware found; and I could include an ATI/NV check and set OpenGL settings accordingly.
"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
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by satrow » 2012-02-23, 05:14

In some areas, the CPU% was actually reduced to the point of it disappearing; even where the kernel CPU% is high, as in the WebSpheres, it still feels and looks better than in my previous testing, which didn't make any mod to OpenGL settings. The look and feel are about the same as in the current default setting.

It wasn't intended to be any kind of browser v browser, which has the higher benchmark; more as a test across all 4 browsers to assess whether they all behaved alike with the same modded settings (though you may have been misled by the recent addition of the 767 score, probably done by a user with a good nVidia card but a weak CPU? Check the WebSpheres result - all my x86 browsers logged 37, PMx64 hit 42 - the new benchmark hit 80fps!).

I think the prefs in the web installer is a good idea, it does expect the user to have a good knowledge of their hardware though; for some of those who bought off-the-shelf, it might lead to some confusion and mistakes? How about limiting it to downloads of the x64 first, my guess is that those users will be a little more savvy overall?

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

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by Moonchild » 2012-02-23, 09:22

I'll just have to have another look at CPU load issues on ATI for v11 and decide if Native GL is better or not.
cymroly wrote:I think the prefs in the web installer is a good idea, it does expect the user to have a good knowledge of their hardware though; for some of those who bought off-the-shelf, it might lead to some confusion and mistakes? How about limiting it to downloads of the x64 first, my guess is that those users will be a little more savvy overall?
Oh you misunderstand - it would be an automatic check and entry. Maybe something with a simple checkbox "Optimize settings for my system".
"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
satrow
Forum staff
Forum staff
Posts: 1885
Joined: 2011-09-08, 11:27

Re: OpenGL and Native GL Performance Boost in Palemoon

Unread post by satrow » 2012-02-23, 09:29

What, no multiple choice questions ;)

Ok, gotcha now :)