Files
UnrealEngineUWP/Engine/Source/Programs/UnrealBuildTool/System/ResponseFile.cs
Mike Fricker 80f6dc9362 UnrealBuildTool: Experimental fast C++ include dependency scanning
- Adds experimental super-fast C++ outdated file checking
- This feature is turned off for now as we continue to test and improve it
      - You can try it out by enabling "bUseExperimentalFastDependencyScan" option in your BuildConfiguration.xml
- Here is the basic idea:
     - We no longer exhaustively scan all includes and build up a big graph every invocation
     - Instead, source files whose build products are missing have their includes scanned asynchronously while being compiled
     - The flat list of dependent includes for every outdated C++ is saved into a new cache file ("FlatCPPIncludes.bin")
     - On the next run, we quickly load that up and "just know" which files to check timestamps on to determine what is out of date
- Lots of "@todo fastubt" comments were added to UnrealBuildTool for potential performance optimizations and further improvements on this feature.

UnrealBuildTool: Determination of which modules have UObjects is now faster
- We now cache which modules have UObjects and load those for the next session

UnrealBuildTool: Module "shared" precompiled header determination is now much faster
- We no longer scan all C++ includes for a module to figure out which "shared" PCH to use
- Instead, we use the module dependencies specified in the module's *.Build.cs file
- For example, if your module depends on "Engine" and "UnrealEd", we choose "UnrealEd"'s shared PCH

Other UBT optimizations:
- Reduced calls to string formatting functions when setting up API definitions for all modules
- Added new performance diagnostics when bPrintPerformanceInfo is enabled in BuildConfiguration.xml
- We no longer check for "external" headers when scanning includes (this code didn't work at all)
- Optimized CleanDirectorySeparators() utility function to avoid string copies

Fixed UnrealBuildTool not saving DependencyCache under a platform-named folder

[CL 2238266 by Mike Fricker in Main branch]
2014-07-31 09:34:11 -04:00

35 lines
1.0 KiB
C#

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace UnrealBuildTool
{
public class ResponseFile
{
/// <summary>
/// Creates a file from a list of strings; each string is placed on a line in the file.
/// </summary>
/// <param name="TempFileName">Name of response file</param>
/// <param name="Lines">List of lines to write to the response file</param>
public static string Create(string TempFileName, List<string> Lines)
{
// @todo fastubt: Make sure we aren't spitting out response files more often than we have to. Also look at Unity.cpp files, injected .cpp files, etc.
FileInfo TempFileInfo = new FileInfo( TempFileName );
// Delete the existing file if it exists
if( TempFileInfo.Exists )
{
TempFileInfo.IsReadOnly = false;
TempFileInfo.Delete();
TempFileInfo.Refresh();
}
FileItem.CreateIntermediateTextFile(TempFileName, string.Join(Environment.NewLine, Lines));
return TempFileName;
}
}
}