關於怎麼將FastBuild設置起來,可以參考這篇文章: [UE4] 如何使用FASTBuild來做分散式編譯 - 地平線上的多貢地平線上的多貢 (horizon-studio.net)

由於4.26內建了FastBuild的功能,因此找了一點時間做了一下實驗

手邊有二台機器,其實驗環境規格如下: Local: AMD 5950x Remote:MacMini 2018版 6 Core i7 with windows 10 (VMWare Fusion)

在沒用FastBuild,建置手邊一個遊戲專案,共422個cpp所需耗時如下:

1>Total time in Parallel executor: 97.03 seconds 1>Total execution time: 106.11 seconds

初始使用FastBuild建置時間如下:

1>--- Summary ----------------------------------------------------- 1> /----- Cache -----
1>Build: Seen Built Hit Miss Store CPU 1> - File : 5306 373 - - - 0.000s 1> - Object : 358 358 0 358 358 3h:39m 49.912s 1> - Alias : 1 1 - - - 0.000s 1> - Compiler : 1 1 - - - 0.000s 1> - ObjectList : 358 358 - - - 0.000s 1>Cache: 1> - Hits : 0 (0.0 %) 1> - Misses : 358 1> - Stores : 358 1>Time: 1> - Real : 7m 6.213s 1> - Local CPU : 3h:39m 49.912s (30.9:1) 1> - Remote CPU : 1h:14m 37.066s (10.5:1) 1>----------------------------------------------------------------- 1>FBuild: OK: all 1>Time: 7m 6.392s

1>Total time in FASTBuild executor: 434.48 seconds 1>Total execution time: 443.53 seconds

由於FastBuild內建Cache機制,因此刪除遊戲專案下的Intermediate後,再次建置後的數據如下: 1>--- Summary ----------------------------------------------------- 1> /----- Cache -----
1>Build: Seen Built Hit Miss Store CPU 1> - File : 5306 373 - - - 0.000s 1> - Object : 358 0 358 0 0 1h:36m 39.116s 1> - Alias : 1 1 - - - 0.000s 1> - Compiler : 1 1 - - - 0.000s 1> - ObjectList : 358 358 - - - 0.000s 1>Cache: 1> - Hits : 358 (100.0 %) 1> - Misses : 0 1> - Stores : 0 1>Time: 1> - Real : 3m 9.674s 1> - Local CPU : 1h:36m 39.116s (30.6:1) 1> - Remote CPU : 0.000s (0.0:1) 1>----------------------------------------------------------------- 1>FBuild: OK: all 1>Time: 3m 9.876s

1>Total time in FASTBuild executor: 197.76 seconds 1>Total execution time: 207.94 seconds

其實結果還蠻令人訝異的,沒用FastBuild居然比用了還快:106秒(LocalOnly) 443秒(FastBuld) 207秒(FastBuild with Cache)

從數據中我們可以知道,目前版本的FastBuild看起來是有些問題,猜測有很大部份的時間都花在網路溝通、計算hash與傳送檔案上了。或許未來這個機制會更加的成熟,但至少就目前而言還不推薦使用。