Closed
Bug 1417048
Opened 8 years ago
Closed 8 years ago
Firefox code build options for Windows are not set correctly.
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1830453
People
(Reporter: a.rainman, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171024165158
Steps to reproduce:
After I opened the page
about:buildconfig
I saw the problem: Firefox code build options for Windows are not set correctly.
z:/build/build/src/vs2015u3/VC/bin/amd64_x86/cl.exe 19.00.24213 -utf-8 -TP -nologo -wd5026 -wd5027 -Zc:sizedDealloc- -wd4091 -wd4577 -D_HAS_EXCEPTIONS=0 -W3 -Gy -Zc:inline -arch:SSE2 -Gw -wd4251 -wd4244 -wd4267 -wd4800 -wd4595 -we4553 -GR- -Zi -GL -wd4624 -wd4952 -O1 -Oi -Oy-
it's FAIL:
These option: -O1 — are incorrect for release if you use MSVC, should be -O2.
The page for the assembly manual
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Configuring_Build_Options
also talks about it.
ac_add_options --enable-optimize
Enables the default compiler optimization options
Note: This is enabled by default
ac_add_options --enable-optimize=-O2
Chooses particular compiler optimization options. In most cases, this will not give the desired results, unless you know the Mozilla codebase very well; note, however, that if you are building with the Microsoft compilers, you probably do want this as -O1 will optimize for size, unlike GCC.
Actual results:
You use -O1 in MSVC instead of -O2
Expected results:
The essence of the problem: people complain that Firefox is very slow, and you do not even use the standard optimizations for the release. Really?! Please use -O2 (or -Ox) optimization for Windows builds!
Component: Untriaged → Build Config
Product: Firefox → Core
Comment 1•8 years ago
|
||
Hello, thanks for your concern, but it's unwarranted. We have spent quite a bit of time over the years choosing optimal compiler settings for Firefox, and rest assured that larger numbers are not always better. Optimizing for size vs. speed is a tradeoff, and larger code size often makes a program slower in many scenarios.
In any event, since Firefox 3 we have shipped our Windows builds with MSVC's Profile-Guided Optimization, which applies targeted optimization to hot code paths:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Building_with_Profile-Guided_Optimization
If you have data to suggest that changing our optimization flags results in real-world performance improvements when Firefox is built with PGO we would love to see it!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•8 years ago
|
||
Thank you for your reply. If you use PGO then everything is fine.
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•