Be less memory-hungry when compiling the Keyboard KCM's gemoetry parser
AbandonedPublic

Authored by ngraham on Jan 2 2019, 8:56 PM.

Details

Reviewers
hein
davidedmundson
bshah
Group Reviewers
Plasma
Summary

The current recursion depth of 512 is rather large and causes out-of-memory errors on even fairly beefy machines.

This patch reduces the recursion limit to 64, which allows plasma-desktop to be compiled on a test of a simulated very low-end machine in a VM: 2 processors with 2 GB RAM and no virtual memory.

BUG: 362946
FIXED-IN: 5.12.8

Test Plan

Compile plasma-desktop on the above-mentioned VM without first disabling this feature ot not building the keyboard KCM. It works!

Diff Detail

Repository
R119 Plasma Desktop
Branch
geometry-parser-compilation-fix (branched from Plasma/5.12)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 6585
Build 6603: arc lint + arc unit
ngraham created this revision.Jan 2 2019, 8:56 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 2 2019, 8:56 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
ngraham requested review of this revision.Jan 2 2019, 8:56 PM
davidedmundson requested changes to this revision.Jan 2 2019, 9:02 PM

The original comment says 256 is not enough so this patch sets it 64? That can't work.

If this patch does actually work then it's a sign that we can just kill all of this.

This revision now requires changes to proceed.Jan 2 2019, 9:02 PM

The patch actually does work for me.

and did that VM break before this patch?

Yes, in that VM, without this patch, I always without fail get stuck and run out of memory here:

Scanning dependencies of target geometry_parser_test
[ 18%] Building CXX object kcms/keyboard/tests/CMakeFiles/geometry_parser_test.dir/geometry_parser_test.cpp.o

However there seems to be another bug since I'm using gcc and not clang, so in theory the property shouldn't even be getting set...

ngraham abandoned this revision.Feb 23 2019, 4:49 AM

Can't reproduce the original issue anymore, and apparently this wasn't really the right solution anyway.