Palemoon 19.0 uses new speed global optimization

General discussion and chat (archived)
Accel

Palemoon 19.0 uses new speed global optimization

Unread post by Accel » 2013-03-02, 02:51

hi MC

i really like your Palemoon build for a very long time starting from V4.x

as far as i know from the beginning of Palemoon project, Palemoon has adopted Profile guided optimization, but starting from Palemoon 19.0, palemoon switched to Globally Speed optimised method..

what this means? and what is the benefit of this method?

Accel

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

Re: Palemoon 19.0 uses new speed global optimization

Unread post by Moonchild » 2013-03-02, 08:00

It means I'm no longer using PGO, but use global speed optimization flags instead ;-)

A few reasons for this switch:
  • Stability: The Microsoft compiler has issues with very large monolithic libraries and the exponential complexity of PGO and LTCG (Link-Time Code Generation) as it grows. PGO works very well for small to medium sized applications and libraries, but becomes problematic for particularly large single libraries like xul.dll. Problems range from unstable code, crashes in Pale Moon and strange errors while browsing to failing builds, internal errors in the compiler, PGO sweeps not working and other yummy details that gives developers headaches and ulcers.
  • Removal of bias: Global speed optimization removes the bias towards the system the browser is compiled on. Certain "paths" are never taken on certain hardware/OS combinations while they would be on other systems, those paths will never be optimized and compiled with smaller but slower code. This is only a lesser consideration but still something to keep in mind.
  • VS2012 metrics: I've kept a very close eye on how much of the code would be speed optimized and how much would be space optimized. In VS2012, these numbers dropped sharply from about 5% of the functions speed optimized to 1% or less. I think this has to do once again with PGO being written for smaller programs so things don't get "exercised" enough in a statistical sense to trigger speed optimization, and as a result it's getting close to compiling everything with /O1 (optimized for size).
  • Code size isn't important: a relatively small increase in code size isn't important for Pale Moon. Most of the memory used is going to be data, not code; meaning that any considerations why you's want to optimize code for size are low priority to begin with.
  • Removal of PGO workarounds: Because PGO isn't used, I've been able to remove workarounds in the Firefox code base that would exclude libraries not only from PGO, but also from LTCG as a whole (which is just as much, if not more, of a speed win in most cases).
All in all, I may lose a little bit of speed in some benchmarks because of this, but it will increase the stability and overall speed of the browser in any real-world scenario.
"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

Accel

Re: Palemoon 19.0 uses new speed global optimization

Unread post by Accel » 2013-03-02, 11:12

now this is what i want to hear

All in all, I may lose a little bit of speed in some benchmarks because of this, but it will increase the stability and overall speed of the browser in any real-world scenario

this is pretty much what i like on palemoon, Stability.. benchmark is not really important, on nowadays browser, i can't even see the difference of speed, chrome / firefox, if your connection is fast enough.

although it seems palemoon has a long time on connecting page now.. only on mozilla browser and derivative ( not on chrome / opera ). wierdly, if i put a proxy server, it connects immediately

is this deficiency of palemoon not using PGO?

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

Re: Palemoon 19.0 uses new speed global optimization

Unread post by Moonchild » 2013-03-02, 16:23

Accel wrote:although it seems palemoon has a long time on connecting page now.. only on mozilla browser and derivative ( not on chrome / opera ). wierdly, if i put a proxy server, it connects immediately
It's possible your connection (router/ISP/Windows settings) doesn't like HTTP pipelining.

You can try making it more aggressive by setting network.http.pipelining.aggressive to true.
If that doesn't help, you can try switching it off by setting network.http.pipelining and network.http.pipelining.ssl to false. Pipelining is not used over a proxy by default in Pale Moon, so it may work better without pipelining for your particular setup.
Accel wrote:is this deficiency of palemoon not using PGO?
No, PGO has nothing at all to do with network delays.
"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

Accel

Re: Palemoon 19.0 uses new speed global optimization

Unread post by Accel » 2013-03-03, 12:21

seems like turning pipelining off did the trick. thanks MC :thumbup:

moonlighting

Re: Palemoon 19.0 uses new speed global optimization

Unread post by moonlighting » 2013-03-03, 19:42

I'm experiencing this problem as of late as well.

Will try turning pipelining off and will report back.

Locked