Bug 198070

Summary: Webkit-gtk is a memory hog during compilation
Product: WebKit Reporter: Raymond Jennings <shentino>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: aperez, bugs-noreply, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Raymond Jennings 2019-05-21 05:47:00 PDT
Is there any way to make webkit-gtk smaller or break it up into multiple modules?

Trying to compile it in gentoo routinely goes into 20 or so gigabytes of memory usage.
Comment 1 Michael Catanzaro 2019-05-21 07:59:22 PDT
Not really, sorry. Use lower -j such as -j1 to limit parallel process for starters. Then experiment with increasing it until you find the highest -j your computer can handle without freezing up.

You can also try -DENABLE_UNIFIED_BUILDS=OFF, but it's usually broken, so you need to be prepared to regularly send a lot of patches to keep this working if you want to try.
Comment 2 Adrian Perez 2019-05-21 12:26:59 PDT
Usually the most critical part of compilation when it comes
to memory usage is linking binaries. Something that helps is
making sure you have the Gold linker installed, and that it
is being used (CMake will print a warning if it was not found,
IIRC). Alternatively, you *might* have better luck with the
lld linker (which uses LLVM), but using it to build WebKitGTK
has not been tested much, so YMMV. I hope this tip helps :-)