That is unexpected. At least 2.2.4 -> 2.2.6 should make no difference to build time. It only added bug fixes.
If I remember correctly (I do not measure each and every time I installed a component) it went from around 1.2~1.4 to 1.8gb. Before 2,2,4 it was around 800 MB.
Measured (or actually more eyeballed but with min and max presented) with system monitor (standard desktop tool).
Building has 2 parts, compilation and linking. Which one hogs memory? I guess linking.
The peak seem to be at the compilation but when that is running down the linker picks up the 'hogging'. Overall the linking seem to be using less memory than the compilation (except for that one last step).
I have never searched/looked for the real reason(s) as I have assume that is the nature of progress (at least when it comes to software).
If you are aware of any available measuring methods that could provide us with (more/better) useful information then please do share. As said I never paid that much attention to it so am not that familiar how to measure such things in a more accurate manner.
Have you compared with the exact same set of packages installed?
No, not really. It is something that you become aware of when using the setup as a daily driver and try to install some (or a) package(s) as the time it takes to rebuild increases. That is why I was never fond of installing packages in the IDE when using the Pi. 15-20 minutes of your life waiting for a rebuild is 15-20 minutes wasted.
Do note that I am not complaining, just observing and trying to prevent people from running into the same issues that I was running into. The more modern SBC's are much more powerful and have better/faster storage facilities (not to mention usually more memory).
If the compilation part hogs memory, it may be caused by parallel compilation of packages. By default the IDE uses as many threads as there are CPU cores but it can be adjusted.
You are right on that. The compilation process is opportunistic in that it takes what it can get. I never measured the difference between the two so perhaps should pay attention to that.
If this is something that is close to your heart or wish to pursue then I'm more than happy to run some tests. If even to proof me wrong
Other than that and for me personally, it does not have any priority for me.