LuxCore Windows Compile Time

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
NickMoon
Posts: 1
Joined: Wed Jan 27, 2021 3:50 pm

LuxCore Windows Compile Time

Post by NickMoon » Wed Jan 27, 2021 3:54 pm

Hi everyone, quick question.
So the Luxcore windows build repository says that a first compile of Luxcore will take about 15 minutes, which is about the time I'm getting, but is there anyway to make subsequent compilations, such as after changing a couple lines in a file, not take the full 15 minutes? Right now I'm just executing the same .bat file.

User avatar
Dade
Developer
Posts: 5089
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: LuxCore Windows Compile Time

Post by Dade » Wed Jan 27, 2021 4:00 pm

Yes, you can directly load the Project in VisualStudio and directly build whatever you want. CMake just generate complete VS project on Windows.
Support LuxCoreRender project with salts and bounties

User avatar
alpistinho
Developer
Posts: 196
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: LuxCore Windows Compile Time

Post by alpistinho » Wed Jan 27, 2021 8:43 pm

On windows, for development I would disable the LTCG option in the build.

It takes a long time because it goes over all build artifacts to do linking-time optimization

It is really short without it
Support LuxCoreRender project with salts and bounties

User avatar
TAO
Developer
Posts: 488
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: LuxCore Windows Compile Time

Post by TAO » Wed Jan 27, 2021 9:50 pm

I don't know if this is going to help you or not, but in the past, I was building the whole LuxCore project for every single test in MaxToLux and it takes almost 10 to 12 minutes on my computer, but from the last build, I decide to just build all DLL's and use them externally (side by side), so instead of compiling LuxCore projects all the time I build it ones and that changes the game for me. now, with using dynamic Dll, I reached the build time of 25 to 30 seconds instead of 10 to 12 minutes.
I'm not sure if that's the same case but if it is you can always use the dynamic library instead of building the project.
I think this is much easier for upgrading the project too.
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

User avatar
B.Y.O.B.
Developer
Posts: 4026
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: LuxCore Windows Compile Time

Post by B.Y.O.B. » Wed Jan 27, 2021 10:38 pm

TAO wrote:
Wed Jan 27, 2021 9:50 pm
but from the last build, I decide to just build all DLL's and use them externally (side by side), so instead of compiling LuxCore projects all the time I build it ones and that changes the game for me. now, with using dynamic Dll, I reached the build time of 25 to 30 seconds instead of 10 to 12 minutes.
This won't apply here, since LuxCore itself is being changed and needs to be rebuilt. It only works if the LuxCore API is used in another project, like in your case (MaxToLux).

User avatar
TAO
Developer
Posts: 488
Joined: Sun Mar 24, 2019 4:49 pm
Location: France
Contact:

Re: LuxCore Windows Compile Time

Post by TAO » Wed Jan 27, 2021 11:37 pm

Yes, of course, it will work from other apps as side by side dynamic library.
Omid Ghotbi (TAO)
Latest build Download link👇👇
https://github.com/LuxCoreRender/MaxToLux/releases
Last update information
https://forums.luxcorerender.org/viewto ... 378#p28378

acasta69
Developer
Posts: 389
Joined: Tue Jan 09, 2018 3:45 pm

Re: LuxCore Windows Compile Time

Post by acasta69 » Thu Jan 28, 2021 1:24 pm

Also using the .bat file processes only the actual changes (unless you use the "/rebuild" switch), however the most time consuming task is linking all binaries with LTCG, and also the initial project generation by CMake is not super fast.

You might want to check the following, which can give some performance improvement:
  • Try using the .bat file with "/minimal": it builds only pyluxcore and LuxCoreUI instead of all the samples, so it should be faster
  • As above, also using "/debug", if it is acceptable for you, speeds up things a lot (no /LTCG nor other optimizations are used when building a debug version, but the generated executables will be much slower, and you'll have to copy binaries manually, as all scripts such as "collect-compiled-binaries.bat" assume a non-debug build)
If you are using Visual Studio full IDE, as suggested by Dade, the generated solution file can be loaded and used directly, so that you can select only the desired subproject to build, e.g. LuxCoreUI or pyluxcore.
The solution file name is "LuxRays.sln" and it is located in "WindowsCompile\Build_CMake\LuxCore" after the .bat has been used for the first time.

If you don't have the full IDE but only the "Visual Studio Tools", you can call msbuild directly from the command line.
For example, this will build only pyluxcore:

Code: Select all

msbuild /nologo /verbosity:normal /toolsversion:15.0 /property:"Platform=x64" /property:"Configuration=Release" /p:WarningLevel=0 LuxRays.sln /target:pyluxcore
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v445.87

Post Reply