If I make some small changes to 1 or 2 cpp files and then to check out whether or not the changes do the required action, I use the command
./2-build-debug.sh all make
Even if i change a single file it takes a lot of time to complete( [all ]40-50mins,[core]20-30min)
./2-build-debug.sh all make I know only a little bit about make, If i am not wrong using make means it should only re-compile/build the changed files then why is it taking so much time.
Is there any way to do things more quickly?
Hi,
as indicated in documentation, any change to a file will need to recomple almost everything depend what has been modified
Modified |
Need to recompile |
studio |
studio |
core |
core -> studio |
ETL |
ETL -> core -> studio |
You could try to install ccache (sudo apt install ccache
) which may improve some part of compilation process.
But don’t expect something marvelous as some files are pre-processed and thus… miss the cache hit.
C++ is slow to compile, that’s why in industry in France we prefer Delphi (Pascal Object) which needs only a few seconds to recompile after a little modification.
And that’s why Synfig’s evolution is so much slow too 
1 Like
@sagar.00joshi Please consider reading this - https://synfig-docs-dev.readthedocs.io/en/latest/common/building.html#re-building-your-changes
In some cases, you can avoid calling ./2-build-debug.sh all make
and call ./2-build-debug.sh core make
and/or ./2-build-debug.sh studio make
instead.
If you modified some file in “synfig-studio” then you can simply call ./2-build-debug.sh studio make
- that will be quite fast.
If you modified “synfig-core” then you have to call ./2-build-debug.sh core make
and ./2-build-debug.sh studio make
.
For synfig-core there are more ticks possible:
If you modified a file in “synfig-core/src/synfig”, then you can cd to “_debug/synfig-core/src/synfig” and just type make install
there - the build will be very fast. And if you didn’t made changes to headers, then it is not required to re-build synfig-studio after that.
In the same way, if you modified a file in “synfig-core/src/modules”, then you can cd to “_debug/synfig-core/src/modules” and just type make install
there - the build also will be very fast. Same note about headers, as in paragraph above.
Also, you can safely rebuild individual modules (in case if you modified only one of them). Just cd into “_debug/synfig-core/src/modules/MODULE_NAME” and just type make install
1 Like