#rb Wouter.Burgers
#rnx
### Bug Fix
- In CL 24941987 FPerforceGetFileWorker::Execute was modified to remove the perforce connection being created as that connection was not used and FPerforceSourceControlRevision::Get would create a second connection to be used.
- Removing this connection has an unintended knock on effect in that the command passed to the worker was never marked as having a successful server connection. So next tick the source control provider would check the now completed command, see that the connection was not a success (even though the command returned a success) and mark the connection to the server as broken, preventing future commands from working.
- Over the last year or so we have tried to move the code away from these sort of non-obvious side effects but there is a lot of work to do still.
- For now it is safest to add the connection back to FPerforceGetFileWorker::Execute but also add an overload to FPerforceSourceControlRevision::Get that allows us to pass in the connection to be used, to avoid the original problem of creating two connections as connection creation is super slow and can be costly on the server.
### Additional Changes
- There was no reason to allocate the FPerforceSourceControlRevision in FPerforceGetFileWorker::Execute on the heap as it is used immediately then deleted. We might as well just create it on the stack.
- Changed some code logic to early out rather than having long conditional scopes.
- The input parameters for FGetFile are still a bit odd (no revision == #0, revision -1 == #head etc) but leaving that alone for now until we merge FGetFile and FDownloadFiles to eliminate the duplicate code functionality.
[CL 25867524 by paul chipchase in ue5-main branch]
* Especially slow when large numbers of files are checked out (in the 25k+ range)
* Existing algorithm scales cubically
* Optimization: Changed to take advantage of the fact that filenames are already in a map, so a cheaper lookup to check if file in changelist is part of the to-be-deleted set
* Benchmark for this change is a map with ~32k empty actors in it. Source control enabled and using world partition (and thus One File Per Actor). It is important to check out all __ExternalActors__ files into default changelist and have the "View changes" window open.
- Delete N actors
- Save the level and measure time
Before:
100 actors : ~20s
200 actors : ~1m 20s
300 actors : ~2m 40s
500 actors : ~7m 20s
After:
100 actors : ~6s
200 actors : ~14s
500 actors : ~25s
There is plenty of room for more optimization here.
#jira UE-187093
#rb Brooke.Hubert
#preflight none
[CL 25652227 by logan buchy in ue5-main branch]
Added GetArrayHash() for hashing arrays by their contents.
Added a new pair of keyfuncs for TSets and TMaps which allow TCHAR* keys (or TCHAR* values passed to *ByHash functions) to be hashed by FCrc::Strihash_DEPRECATED().
#rb devin.doucette
#preflight 64708e7c296b2b37c6fd894a
[CL 25647216 by steve robb in ue5-main branch]
* Especially slow when large numbers of files are checked out (in the 25k+ range)
* Existing algorithm scales cubically
* Optimization #1: Changed to take advantage of the fact that filenames are already in a map, so a cheaper lookup to check if file in changelist is part of the to-be-deleted set
* Optimization #2: Another optimization takes advantage of the fact that it is typical the changelist to update is often the one in the to be deleted set. This is not going to be true for all workflows but helpful anyways.
* Benchmark shows deleting 100 actors from a level with 25k one file per actors checked out in default changelist takes the time to complete the operation from 12s to ~200us. Without optimization #2, this takes about 2s to complete.
#rb Brooke.Hubert
#preflight none
[CL 25604910 by logan buchy in ue5-main branch]
+ Expand source control menu context with selected changelist,
+ Expose information about if changelist is default and its source control specific identifier,
#rb Patrick.Enfedaque, Patrick.Laflamme, zach.rammell
#preflight skip
#p4v-cherrypick 25526575
#preflight 64665919b91ab13b09c2089c
[CL 25528171 by jordan hoffmann in ue5-main branch]
#rb none
#jira UE-183529
#rnx
#preflight 643fc10ba35280ed4f6a5590
- If p4 print is run on a path for a depot that either does not exist on the server or cannot be seen due to permissions then the server will return "-must refer to client" along with the name of the current client spec. This can be quite misleading since p4 print does not actually need a client.
-- To improve things for the user we can replace the error message provided by the p4 server with "no such depot"
[CL 25103494 by paul chipchase in ue5-main branch]
#rb none
#jira UE-183529
#rnx
#preflight 643e6671b91c130758304d30
- Added code documentation
- Renamed ::AddFileData to ::__Internal_AddFileData and documented that it is for internal use in the source control api. This is a standard problem with our operations being both input and output structures and needs a better solution.
- Moved ::GetFileData to the cpp to reduce the amount of code in the header file.
[CL 25083228 by paul chipchase in ue5-main branch]
- Failed if user had multiple p4 tickets
- Failed if default p4 username didn't match the provided username in UE
#jira UE-181982
#rb paul.chipchase
#preflight 643061621d61ecec3b63c465
[CL 24970980 by jordan hoffmann in ue5-main branch]
#rb wouter.burgers
#jira UE-181418
#preflight 642ece61df6c5c78fc9b99c9
- Added FSourceControlResultInfo::EAdditionalErrorContext that describes additional info about errors that the operation might have encountered that the caller can poll for rather than trying to parse error strings.
-- NOTE that we cannot enforce this info to be provided by source control provider implementations so this additional info should only be used to improve error messages.
-- Initially we support the connection to the provider failing and the connection to the provider dropping mid operation.
- Moved FSourceControlResultInfo to its own code files.
- I wanted to move the implementation of FSourceControlResultInfo::Append to the cpp, but this causes linker problems even with SOURCECONTROL_API as some modules are not including source control properly. For now I have left it in the header file and will look into this in another code pass.
[CL 24943799 by paul chipchase in ue5-main branch]
#rb Wouter.Burgers
#jira UE-173524
#rnx
#preflight 642e806dda7f9583702d81e4
- FPerforceGetFileWorker::Execute doesn't actually do any perforce work directly, it creates a new FPerforceSourceControlRevision and lets that object do the perforce work. So the connection that FPerforceGetFileWorker was making was never used and FPerforceSourceControlRevision would then create a second connection.
[CL 24941987 by paul chipchase in ue5-main branch]
* Aids in testing this feature
* Use CMD: SourceControl.Perforce.IdleConnectionDisconnectSeconds = <seconds>
#jira UE-173884
#rb johan.duparc
#preflight 642af82e6a37fb35e9bd0e42
[CL 24905944 by logan buchy in ue5-main branch]
* Option to check in an asset from the Content Browser Source Control Context Menu is now enabled if the SCC does not use Snapshots instead of if it uses File Revisions
* Option to check in an asset from the Scene Outliner Source Control Context Menu is now enabled if the SCC does not use Snapshots instead of if it uses File Revisions
* Ability to uncheck files in the Submit Files Window is now enabled if the SCC does not use Snapshots instead of if it uses File Revisions
* Option to revert the writable flag on an asset in the Content Browser Source Control Context Menu is now enabled if the SCC uses checkout instead of if it uses File Revisions (like the 'Make Writable' option)
#jira UCS-6630
#rb brooke.hubert, wouter.burgers
#lockdown jeanmichel.dignard
#preflight 640e6b41482188d710ff8316
[CL 24724061 by marco anastasi in ue5-main branch]
A connection to the perforce server can consume a large amount of memory on the server. This change is to add a timeout to any persistent connections
in order to conserve this memory.
To do so, a connection tracks the platform time of the last successful communication. The provider checks the persistent connection it has each frame and if
the last successful connect exceeded the timeout, then the connection is closed. A new persistent connection will be established next time one is required.
The timeout is set as a hardcoded value for now.
#jira UE-173884
#rb Ronald.Koppers
#preflight 64122ee5af3fc352929f8e3b
[CL 24665411 by logan buchy in ue5-main branch]
Add -fastexit parameter to terminate process instead of shutting down engine.
Turn off build target features to build less code (total dll size reduced from 56 MB to 46 MB).
Disable external profiler supports (skips loading of some dlls).
Don't spawn any reserve workers (by adding a DefaultEngine.ini for UnrealPak).
Make UnrealPAk compile in Test config (by fixing compile error in PerforceConnection.cpp).
#rb carlmagnus.nordin
#rnx
#preflight 63e5eaf66473b534f14e377b
[CL 24118943 by pj kack in ue5-main branch]