[OpenJDK 2D-Dev] RFR: 8247872: Upgrade HarfBuzz to the latest 2.7.2

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Nov 17 21:40:33 UTC 2020

On 2020-11-17 19:08, Philip Race wrote:
> So maybe the actual *usage* of C++11 features slows it down.
> I found this :-
> https://stackoverflow.com/questions/34179434/is-compiling-with-c11-way-slower-than-with-c98 
> I really did not even think to measure the build time and I don't
> think there's any JDK build parallelism in building a specific native 
> library.
> The build is parallel at a higher level but not at that lower level.
There is build parallelism on multiple levels. When building an 
individual library, make is free to parallelize the compile task; only 
the link task is done singlethreaded. When determining which libraries 
to build, make is free to chose those available depending on tasks 
already finished. For instance, to build java.desktop-libs, we need to 
have finished java.desktop-java (since javac generates the header files 
needed by JNI integration). But after that, it can be compiled whenever 
make think it's suitable.

This freedom for make to reorganize the order also means that it is hard 
to determine the additional cost for building a specific part. You could 
try to build java.desktop-java, and then run "make LOG=info 
java.desktop-libs" JOBS=1 to get a somewhat proper assessment of the 
time spent building all native libs for java.desktop. If this changes 
with the HarfBuzz upgrade, the HB upgrade is likely to blame.

> -phil
> On 11/17/20, 10:00 AM, Florian Weimer wrote:
>> * Philip Race:
>>> There is more code in the newer version but not 4 times as much !
>>> Harfbuzz now requires c++11 features (-std=c++11)
>>> Possibly the C++ compiler you are using (you don't mention platform) is
>>> slower in this mode.
>> It's GCC 8 on Debian buster, which defaults to C++14.  And it's
>> possible to write slow-to-compile C++ in all language modes.
>> Is the Harfbuzz build parallelized?

More information about the compiler-dev mailing list