 here so that I don't have to speak to myself because I already know all this but maybe you don't so let's just talk and see what we find out so anyone here I hope knows that the liberal face is this is wrong it's not big it's huge everything takes ages if you want to find something you look in all places building takes all the time you need a lot of this space and so on and even though watching build go on and on can be fun for a while maybe you should be doing something useful and I'm going to give you some tips on how to spend less time just watching build go on and so have more time left for actually useful work so building liberal face takes all the time so what can you do about it you can make the build make faster somehow or you can make or you can build less of the stuff or you can build it when you don't need to wait for it so the easiest solution is if your machine is not fast enough for building you get a faster one that's a very fast one you just use those money thingies and it's suddenly magically faster you don't need to do anything and this is actually not a job it worked for me but yeah pretty much any other solution is going to be more complicated than this but also cheaper so if you don't have one fast machine you can kind of build a big fast machine machine out of several slower ones you can run a distributed build this basically works by your local machine preparing all compilations and sending them to another computers if you work in a company where you have colleagues those colleagues have also computers which are probably not busy all the time if you are at I don't know college maybe a roommate has a computer maybe you have this old machine which you put away when you bought the faster one and so on and the tool for this is ice cream we have a switch enable ice cream which should enable it automatically and yeah basically you just run a parallel build and yeah basically the number is just some minus j100 that's okay it it will not overload the system there is a central scheduler which is rather intelligent where to send the jobs so for example when I work at SUSE I of course installed ice cream on many computers of my colleagues and some of them were like but it will make my computer slower if there are builds on my machine and I was like no no no you won't even notice and in fact like I don't know maybe two years after I installed the stuff one of the colleagues came to me and I was like so you install this ice cream thingy on my machine too and I was like yeah what's the problem and the problem actually wasn't that it was like making this colleagues work slower but he started using using a CPU usage indicator which was kind of a duck floating on water and when it was was idle it was just happily doing nothing and when the CPUs were busy the water started to boil and the duck was starting to have a hard time and the indicator counted complete CPU usage so ice cream runs with nice priority but whenever I started a build the duck was just having a really hard time and the colleague was like absolutely nothing with the machine and he said it took him like a month to figure out what was causing it so you probably don't even need to ask your roommates colleagues or whatever just install it and they probably won't even notice yeah but it's nice to ask so yeah if you use ice cream the other one which gets often mentioned is ccash which basically works if you're a compilation it remembers exactly all the input for the compilation and caches the result and the important word is exactly if you change the source file only a tiny bit if you switch the options you need to build a new so basically the problem is if it's exactly the same compilation why would you need to repeat it so basically I am of the opinion that it doesn't matter for normal usage and there are only two cases where it matters if you run clean rebuilds some people like to start every every morning or every Monday or whatever with a completely clean build of the graph is so that helps because many of the files which you need to compile they haven't changed and the other one is if you bisect because for example you if I mean if you bisect you do binary search binary division and there may be a commit which changes some header file in some basic library so basically if you would you would need you would do a jump a step and you would go over the commit and force a compilation of everything and you would say no this is already too new so let's jump back and you would again skip over the commit so you again have a change in the file and with C cache you would just have built before and after and it would remember them but I mean C cache has like depends on the machine body has at least like at least 10 person overhead so you would need to have at least one in 10 cache width which is actually not very likely during normal usage and since I mentioned bisecting you don't actually need to often bisect at all I mean even just one build takes ages so it's better to go to the wiki page don't know a rather large archive which has builds like 100 commits apart or so and if you want to find where some something broke you will use bisect over over the build binaries you don't need to learn it yourself this is actually pretty useful because you could spend like days on bisecting manually something and this way you will have it like in half an hour but if you don't count it down long which is really big but you did it you did it only once so these things I mentioned there were like quite easy to use and if you want we will get to more and more hengish solutions or more manually demanding so you start building by just typing make and you can you can say what was to build so normally maybe if you are just make even if you have changed just one file it will also run some checks and so on so actually what I myself use is that I use make build no check which is just a couple of seconds if you have only changed one or two files and it skips the test I'm actually not sure why it's not the default for some apparently whoever created it believes that if we are forced to run some of the checks for every single rebel that it helps but yeah I just run build no check all the time also if you are interested for example only right writer you can just rebuild the sw module or for example you can run only checks in the in the right module or you can even remember one gbuild target this is this is basically the name of the dog and calf file so you can you can run ask you can just build a specific library or you can run a specific unit test and you can you can be basic there are a pretty about what gets rebuilt if you know how to say what you only want to rebuild and yeah as I mentioned made for the always a bit faster so that also helps another problem we have is we have one central repository and whenever you make a comment it goes to this one central repository and so definitely don't have any match commits we need to replace whenever somebody else commits which so and whenever you replace your local sources will update and it's quite possible that I might have just in the meantime fixed a comment in string dot hxx and just because you want to push one or tiny little change you will need to rebuild everything so and maybe it's a maybe you have broken build and you need to push quickly you cannot wait until evening so how well how will push it one of the options this is actually what I use you will use it format patch which will create batch files from all your commits you have locally which have not been pushed yet and you will have another git clone checkout and you will apply the commits there you will replace there and push there or you can have something which is described in detail and because well you will use phone with reference and you will also use another checkout which will refer to your working checkout and the comments in your working checkout you can again replace in the other one and you can check pick your comments and push them from there so you will you will do this without any changes in the in the in the checkout where actually work so how many people here build liberal face and do not use enable dbg you feel ah shame on you you're sure but you can be excused for example by the fact that ah the back info for liberal face as everything is huge so it takes a lot of time and also it takes time to just write it to the disk so one of the thing is we have a configuration which will let you skip some of them for example if I work mainly on variety I'm not really interested in data info for cal or impress which is actually quite big so I can use the option to to avoid it and it can save gigabyte of disk space or so it's quite a lot and another thing which helps again whenever you build you create a dot o object file from from the source file and the headers and so on and you any art or the information about the back to this object file and when you create the shared library you take all these dot o files and match them into one dot s o file the shared library and with since again everything is huge it's a lot of disk space and it takes it can take a number of seconds just to read it and write it and a recent gcc or or client support option split warp which will put some of this file in the separated dot d w o files and these files will not be used when linking so the s o file will be smaller this again saves some some disk operations and disk space so it's faster it's rather new so for example this is not officially supported by ice cream or sea cash yet there are patches for this and yeah I have I have a patch for ice cream in the works for like half a year because it also needs a compiler support or I believe hex yeah whatever but eventually and you can you can only well right now we don't have any support in liberal frist either but you can try it manually this is even more manual even more akish if you run if you run a normal normal build you either build for with optimizations or you build with the back before and optimizations take additional city time because the compiler is all thinking about you know what optimizations it can do and that's all the calculations and whatever and debugging for on the other hand it increase this usage and I operations but sometimes you are for example just interested does it build and you don't need all the optimizations so you can explicitly use compile flux to turn both of these on and of course after that it will be slow and you won't be able to debug it but if you are for example as I said only checking if it builds or you're just bicycling in case you in case the bike bike doesn't work it just works and it saves a little time yeah I understand and I think I already mentioned that if somebody changes for example a header file in some basic library like the string class it may be just a change in a comment but make works by comparing time steps of the files so the file gets newer and if you run make it will see oh this very basic file has changed anything depends on the file so yeah I'm going to rebuild everything because I changed a comment which doesn't change anything at all so in case you change some very basic file and know that your change has no practical implications which would require a rebuild you can change the timestamp back for example I actually have a script for this it means change the timestamp of the file for the 2d generate first of 2001 so the file will be very old and make will think it's okay so I actually use this quite a lot yeah even more akish for the about a thousand time the library is huge so building everything takes a lot of time and for example if you are just checking a change in a basic library and you know it affects only writer maybe you don't want to rebuild calc all the time so what I once found out is that if you move the directory away and edit and remove it also from the mentioned file and you can just start make it will not it's not there it will not be built there are some directories like there is the post the post-process module which requires it to be built so it's necessarily it's built at least once otherwise some of the files may be missing which other modules require but if you are for example biasing thing you can just move it away around the build put it back do another bisect step and so on still sometimes you cannot really work with a liberal office checkout which is one month old you will get number of match problems and so on sometimes you do have to build so it's not usually usually not a good time to do it in the middle of your workday because that means you won't be doing anything for the rest of your workday so what some people do for example is you can for example when you leave work you can as the very last thing start a new build and if the new build fails you can do some tricks which help like because if you are if you start a new build in your checkout and it fails and you can you can spend your following working day just fixing the bill so you can do either a backup or what i use i have to build directories and a same link which points at the one which actually works and i built in the new one i only when it builds correctly i switch yeah and i'm pretty sure that there can be more ugly or less ugly acts so if you have another interesting one please share i would like to learn something you do it still takes a lot of time so maybe if you have questions or if you have some interesting useful tricks i have missed do you ice cream do all the machines need to be exactly the same operating system version uh no ice cream is rather flexible uh you can if you if you just install it on machines you can even cross compile between 32 bit and 64 bit i mean it just in just one direction but it basically works that it packs a small environment of your build tools sends it to the other machine and runs it in a change route so like open to set to fedora that works and if you do some manual work you can even cross compile so for example people working on android use use ice cream to build on actually fast machines in parallel and uh it works you need some manual work but for the normal case you just install ice cream use enable ice cream make sure that at least one of the nodes is a scheduler because you need the central point which distributes where to the and so on and it just magically works yes was there an issue with the boot to last hackfest we had an issue with the boot to getting a boot to work together with fedora they didn't do the different versions of ice cream it didn't work at that time uh yeah occasionally happens uh like two or three opens versions there was a problem with some glc compatibility with very old uh susah versions so some somebody didn't quit ugly hack which kind of changed the description of the architecture and so basically could could only distribute from the specific open to subversion to the specific open to subversion and the rest of the world rest of the world was a different version but those are rather specific examples i remember when i still worked on kde whenever we had a conference uh somebody just started a scheduler the organizers provided some machines and everybody they had whatever distribution they had and everybody just built on everybody else's machine so generally it works got it back a selective info done it well here i checked in one of the last versions and it wasn't wasn't hmm it is working on my laptop actually yes yeah uh you can actually do this thing you can do uh yeah you can also you can also do debugging for manually if you if you made the bug uh equals one or two or whatever you you can do everything without debugging for and and again in the module where you do need your debugging for it also works yeah um the last trick you mentioned like having to work in directories and then switching on when the new girl is ready and how do you get um get around the problem that you typically can't move around your source tree because all the dependencies are absolutely positive yeah that i have a build script which does this what's that uh it changes to the absolute path so i have uh l1 and l2 directories which are the two builds and i have l o sim link which points to the one uh or to the second one and this basically uh i work in the l o one sim link and when i build this just changes directory to l1 or l2 whichever one is the one when it falls yeah i i i first used it without it and i kind of noticed that it was magically updating files in one or for the directory so it's necessary to use absolute path for the actual building but i've been using this for i don't know two or three years by now and it works fine okay so thanks for watching