I happen to be in a situation that I can compare, having worked on Mozilla
(long+ ago), Presto and Chromium. Of those Presto seems to be the odd one
out with dramatically lower compilation times but it's also not instant,
just 10x faster.
As how it got here it's been a slippery slope of combining factors.
Modern C++ is heavy to compile. Last I checked (~2 years ago) 30% of the
compilation time of a file in Blink was template instantiations. Presto
happens to not use templates much/at all. Chromium makes heavy use of
templates.
Features. The browser is replacing the operating system in many cases and
growing an awesome number of features. Every new feature adds code.
Chromium is a collaboration of a hundred distinct projects (some big like
v8, skia, wertc, and many tiny) and they duplicate code and functionality.
Are there still 4 regexp engines in Chromium? 5? How many png decoders?
String classes? Presto is a monolithic code base where external libraries
(very few because of licenses and size/efficiency requirements) are
adapted to reuse existing code.
Lack of good ways to share code. In the jumbo project I keep stumbling
upon code that is copied rather than reused, and where there is no
acceptable place to put it. There is //base but not for code that is only
ever getting to be used twice and sibling projects can't depend on each
other just to share code.
Recent problem: Extreme code splitting. Every unit, be it a gn target or a
C++ file or a header, has some inherent overhead. Both in processing by
tools, and by adding more and more abstraction layers to make the units
fit each other nicely. This is one thing that worries me. Code is split
out of too large targets to make it more maintainable, but is one too
large target worse than 200 tiny modules where nobody has any overview and
where every tiny module has added one, two or three more abstraction
layers?
The actual compilation time problem is also (sadly?) hidden or mostly
mitigated by the awesome distributed compilation system that is goma. On
some platforms (Linux, ~Mac) icecc can also assist really well, but only
for people with access to large sets of computers. Anyone sitting at home,
or in their student dorm, they are out of luck. There is a need of more
diversity in the project to cover all users and potential users but while
the people are friendly, they development environment is not. This problem
might be known to most developers but "knowing" and "understanding" is not
the same thing.
So where to go from here? I don't think use of modern C++ is going away,
and with the attitude of the language developers ("the compiler will fix
it") when confronted with inefficiencies in the language, I think it might
get worse.
I would like there to be a minimum size of code modules, and if things are
too small, merge them. Realistically I don't see this happening except
when things have become silly (as in some single file blink modules that
merged last year).
I would like there to be a taboo against duplicate functionality and code.
A taboo only broken when there are extremely good reasons. A taboo that
covers the whole project, not just locally within a function or file, or
directory. It requires adding trash heap for utility functions. Oh, it
will look bad in a design document. It will make people scowl. I don't
care. It will make the product better. Making a problem visible isn't
making it worse. It is making it better.
Ok, this mail ended up much longer than intended. If you get down here,
well done! :)
/Daniel
On Thu, 22 Feb 2018 20:21:50 +0100, Torne (Richard Coles)
Post by Torne (Richard Coles)Last I heard Chromium is slower to build than firefox, but not by a huge
amount (same order of magnitude); I don't know about any other browsers
as >most of the rest aren't open source (or are based on chromium and so
are just as big/slow to build as chromium is). Browsers are just
extremely large >and complex programs, and also care a lot about
performance so may use aggressive build options that produce better
binaries at the expense of >slower build times.
Post by popov654Thanks for the clarification. However, I still wonder, if every major
browser is compiling in several hours (or these times can be somehow
reduced). >>We know some examples: Maxthon, Opera Presto (now dead for
6 years), Internet Explorer (also dead). Are they also so heavy? Asking
just of >>curiosity.
ÑеÑвеÑг, 22 ÑевÑÐ°Ð»Ñ 2018 г., 19:58:17 UTC+3 пПлÑзПваÑÐµÐ»Ñ Torne (Richard
Post by Torne (Richard Coles)The distributed compiler service isn't required to build (a
sufficiently powerful machine can build it in a reasonable time); it's
only required to >>>build *really* fast.
Also, Chromium didn't really "become" so heavy - while compile times
have gotten longer they were never very fast unless you had very
Post by popov654Post by 'Shinya Kawanaka' via Chromium-devpowerful hardware, as chromium has always been very large - even
with the build times from several years ago we were already using the
Post by popov654Post by 'Shinya Kawanaka' via Chromium-devdistributed compiler service to get build times down to well under
10 minutes, which wasn't feasible on a single machine even when the
code was >>>smaller.
Post by popov654And why did Chromium become so heavy that it takes so long to
compile? Is it because of many new functions, or is something wrong
with >>>>architecture of code?
I know it always required very powerful hardware to compile... But
the distributed network? :\
вÑПÑМОк, 9 ÑМваÑÑ 2018 г., 9:51:06 UTC+3 пПлÑзПваÑÐµÐ»Ñ Shinya Kawanaka
Post by 'Shinya Kawanaka' via Chromium-devHi,
Chrome's build time is getting longer and longer. According to
https://groups.google.com/a/chromium.org/forum/#!msg/chromium-dev/>>>>>ThDAjO7fTro/bPQzvbVLAgAJ,
build time was 30 minutes in July 2014, but it is now more than 150
minutes (without jumbo) in 2017 on >>>>>particular Mac.
Google is internally using a distributed compiler service, Goma.
With Goma, chrome can be built in a few minutes. However, it's
available only >>>>>for googlers, so non googlers need to wait for
long time to build chrome, and this must be painful.
To cope with this, Goma team is working so that all Chromium
developers can utilize improved compile performance enabled by Goma.
As a first step, Goma team has made the client code open source in
https://chromium.googlesource.com/infra/goma/client/
Unfortunately, Goma server is not publicly available yet, but we're
working on this. We hope we can make the server publicly available
this >>>>>year so that all Chromium developers can be more
productive. Stay tuned.
--Shinya Kawanaka
http://groups.google.com/a/chromium.org/group/chromium-dev
---You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/562bff63-b495-4846-8cb8->>>>bdb1849c0170%40chromium.org.
http://groups.google.com/a/chromium.org/group/chromium-dev
---You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/9662acc2-6199-474a->>bf92-9f45ca703029%40chromium.org.
http://groups.google.com/a/chromium.org/group/chromium-dev
---You received this message because you are subscribed to the Google
Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEV->rjeFFOA1mSNgVAwFHxVHjPTuyOBGB-A5pzz%2BcTJ%2BgG7W%2Bw%40mail.gmail.com.
--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/op.zevxy8g7rbppqq%40cicero2.linkoping.osa.