Do not rebuild entire project on change of website content

If you have a simple question and just want an answer.
DemoniacMilk
XCore Addict
Posts: 191
Joined: Tue Jul 05, 2016 2:19 pm

Do not rebuild entire project on change of website content

Post by DemoniacMilk »

My current project has a build time of almost 6 minutes.

Part of the project is a webserver + website. Whenever any of the website files changes, the project is rebuilt entirely, so every small change on the webpage will require 6+ minutes to evaluate. I cannot test the webpages "offline", as they are filled with dynamic expressions {%..%} and are partly created on the fly.

Is there any way to not have the whole project rebuilt, whenever a web page file changes?
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

Are the webpages global data? An incremental build with a change in global data will typically trigger a compile of one file and a link. Is that what takes 6 minutes in your workspace or is the problem that a change in webpages causes a clean build?
DemoniacMilk
XCore Addict
Posts: 191
Joined: Tue Jul 05, 2016 2:19 pm

Post by DemoniacMilk »

Not sure about the global data part, how do I know? web files are put in the project/web/ directory and not sotred in flash.

For testing, i built the project, then removed one letter in one of the web page's files. It said "incremental build of .." but seemed to rebuild almost everything: 09:08:29 Build Finished (took 4m:11s.863ms)

I did a clean build for comparison: 09:14:29 Build Finished (took 5m:6s.729ms)

and another incremental build, changing nothing: 09:18:02 Build Finished (took 15s.180ms)

So on changing the website, it actually does not rebuild everything, but ~80% of the project.
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

If you are using lib_webserver, that has a dependency of web_files.c on all your hosted files in a directory called web/

Any changes there will make web_files.c recompile and link your whole program, as a minimum. The compiler might do more, depending on what else it has in the generated tree of dependencies. You are seeing 80% of the build time for an incremental change, but that might be that the link step is taking up to 80% of build time. Compile is generally much faster than link in our tools.