Commit Graph

92 Commits

Author SHA1 Message Date
Geremy Mustard
763958de14 #ue4 - Added > and < operators to FAssetData to allow the simple TArray.Sort
--------
Integrated using branch UE4-to-UE4-Fortnite-Simple (reversed) of change#2696404 by Geremy.Mustard on 2015/09/17 20:13:36.

[CL 2696406 by Geremy Mustard in Main branch]
2015-09-17 20:14:49 -04:00
Daniel Lamb
ac20b6167b Asset registry no longer reloads ddc data in cooker when saving asset registry. End of cook performance improvement.
#codereview Bob.Tellez, Graeme.Thorton

[CL 2670905 by Daniel Lamb in Main branch]
2015-08-27 10:35:25 -04:00
Bob Tellez
b913fae582 #UE4 Consolidated CreateAssetDataFromLinkerTables and CreateAssetDataFromCookedPackage into FPackageReader::ReadAssetRegistryDataIfCookedPackage and established a separate list of cooked packages found with no asset data to fully load later. This way FAssetData is not used to transfer information to the main thread about non-assets (packages).
#codereview Robert.Manuszewski

[CL 2666797 by Bob Tellez in Main branch]
2015-08-24 17:36:14 -04:00
Bob Tellez
c3c3ee6edf [AUTOMERGE]
#UE4 Deleting FBackgroundAssetData as it is not really needed anymore. All instances were replaced with FAssetData.

#RB Ben.Zeigler

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2664545 by Bob.Tellez on 2015/08/21 12:03:24.

[CL 2664727 by Bob Tellez in Main branch]
2015-08-21 14:21:07 -04:00
Jamie Dale
a1bf29ec96 Fixed FAssetRegistry::DependencyDataGathered favoring soft asset dependencies
FAssetRegistry::DependencyDataGathered was potentially replacing hard asset dependencies with soft asset dependencies, but the hard asset dependencies need to take precedence.

[CL 2654899 by Jamie Dale in Main branch]
2015-08-13 13:10:54 -04:00
Jamie Dale
21943a2420 Fixed a case where FAssetRegistry::RemoveDependsNode could potentially delete an allocation from within an array allocation
Also replaced NULL usage with nullptr inside FAssetRegistry.

[CL 2654861 by Jamie Dale in Main branch]
2015-08-13 12:31:04 -04:00
Jamie Dale
f25f5c26de Finished renaming FPathTreeNode to FPathTree
[CL 2654856 by Jamie Dale in Main branch]
2015-08-13 12:22:19 -04:00
Jamie Dale
8f5f0bee88 Improved the caching of FPathTree (as used by FAssetRegistry)
The CachePath function of FPathTree (formerly FPathTreeNode) used to always test each component part of a path to ensure that the path was available in the tree. This not only involved always performing an FName -> FString conversion for each path that was found by the asset registry, but it also resulted in repeated work being performed when the path was already fully cached.

The new FPathTree contains a map of full parent paths to full child paths (all using FName), which allows it to early out if it's already cached the path in question. This not only avoids the repeated work, but also avoids several FName -> FString -> FName conversions that used to happen between adding a path, and then retrieving it again later (the path would previously be rebuilt from its component FString parts, and then converted back into an FName - now it just uses the FName that we already have in the map).

These changes can dramatically improve the asset registry processing performance for large projects.

[CL 2654839 by Jamie Dale in Main branch]
2015-08-13 12:09:39 -04:00
Bob Tellez
ec74ed64a3 #UE4 Moved DependsNode.h back to the private folder while it is being discussed as to how we should handle serialization of the asset registry. This was intended to be an internal data structure and should not be used outside of the AssetRegistry module.
#codereview Daniel.Lamb

[CL 2653841 by Bob Tellez in Main branch]
2015-08-12 20:07:51 -04:00
Robert Manuszewski
746075c8de FCustomVersion optimizations:
- Friendly name will no longer be serialized
- Reduced memory footprint of friendly names
- Faster custom version look up when serializing many custom versions

[CL 2646438 by Robert Manuszewski in Main branch]
2015-08-06 10:59:07 -04:00
Jamie Dale
1461e7d026 Improved the asset gathering and path prioritization workflow for very large projects
Previously, the file discovery phase of the asset gathering process would block the entire process until it had found all of the files it needed to test.

This can take quite some time for projects with a large amount of assets, so this change adjusts the process so that discovered paths will be reported back to the asset registry while the file discovery is on-going. This allows you to prioritize the scanning of certain folders before the initial discovery phase has finished.

To account for the fact that the asset registry will be reporting process of an unknown range, the asset discovery indicator has been updated to display a marquee bar until the initial file discovery has finished.

It will now show you the following messages:
    - "Initializing Asset Discovery" - Loading the cached asset registry data and waiting for the file scan to start. The progress bar will marquee while this is happening.
    - "Discovering Asset Files" - Shows an increasing count of the number of asset files that have been discovered on disk. The progress bar will marquee while this is happening.
    - "Discovering Asset Data" - Shows a decreasing count of assets that need to have their asset data either read from disk, or copied from the cache file. The progress bar will show the percentage of the assets processed by the asset registry compared to the total number of assets to load and process.
    - "Processing Asset Data" - Shows a decreasing count of assets that the asset registry still needs to process the gathered asset data for. The progress bar will show the percentage of the assets processed by the asset registry compared to the total number of assets to load and process.

One side effect of having the discovery phase scan go wide (rather than deep - to allow you to prioritize the scanning of certain folders) is that it may now report back folders that don't contain any assets. This essentially addresses a long time complaint from users, whereby the Content Browser wouldn't show empty folders.

This change also has the cached asset registry file write out for every 50,000 files that are read from disk. This avoids you needing to perform repeated work if you restart the editor before the entire scan has finished.

[CL 2644762 by Jamie Dale in Main branch]
2015-08-05 09:27:31 -04:00
Richard TalbotWatkin
83833f1705 Fix broken build following merge from Fortnite branch.
#codereview Bob.Tellez

[CL 2643213 by Richard TalbotWatkin in Main branch]
2015-08-04 05:33:56 -04:00
Bob Tellez
92a85dfb9d [AUTOMERGE]
#UE4 Fix non-monolithic builds. Moved asset registry tag whitelisting logic out of FAssetData and into FAssetRegistry::SaveRegistryData

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2643049 by Bob.Tellez on 2015/08/04 00:03:19.

[CL 2643050 by Bob Tellez in Main branch]
2015-08-04 00:03:41 -04:00
Bob Tellez
e4af79aa8e [AUTOMERGE]
#UE4 Asset registry tags are now excluded from builds unless they are added to the CookedTagsWhitelist which can be configured in BaseEngine.ini. For full backward compatability add +CookedTagsWhitelist=(Class=*,Tag=*), but it will bloat your memory usage.

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2642971 by Bob.Tellez on 2015/08/03 22:46:20.

[CL 2642973 by Bob Tellez in Main branch]
2015-08-03 22:47:31 -04:00
Jamie Dale
466912cfbe Fixed FAssetDataGatherer::PrioritizeSearchPath not working with the root paths
FPackageName::IsValidLongPackageName would fail for the root paths as the mount path roots all end with a trailing slash, however FPackageName::IsValidLongPackageName doesn't accept paths that end in a trailing slash (as it's expected to be working with names, not paths).

This change updates FAssetDataGatherer::PrioritizeSearchPath to use FPackageName::TryConvertLongPackageNameToFilename instead (which will gracefully fail on an invalid path), and SPathView makes sure that it appends a trailing slash to the path it gives to FAssetDataGatherer::PrioritizeSearchPath.

[CL 2642169 by Jamie Dale in Main branch]
2015-08-03 13:14:52 -04:00
Daniel Lamb
5f9a3d5f57 Fixed asset registry loading code after asset reigstry format change.
#codereview Robert.Manuszewski

[CL 2637636 by Daniel Lamb in Main branch]
2015-07-29 16:47:44 -04:00
Jamie Dale
068fea7b24 Updated the asset registry gathering to use the directory iteration functions that provide file stat data
The discovery phase now uses the fact that the stat data for a file is available up-front to perform the check against the cached timestamp immediately. On Windows, and for the cases where most or all of the data is cached, this can significantly improve the asset registry gathering time as it avoids performing a second scan of the file-system for the majority of the files.

[CL 2634348 by Jamie Dale in Main branch]
2015-07-27 15:27:45 -04:00
Bob Tellez
22aca95769 #UE4 Bumping Asset Registry cache version after CL#2632031 changed AssetData's serialize function.
[CL 2632326 by Bob Tellez in Main branch]
2015-07-24 11:50:41 -04:00
Robert Manuszewski
3bcc864c3d Added support for loading cooked content in editor.
#codereview Daniel.Lamb

[CL 2632031 by Robert Manuszewski in Main branch]
2015-07-24 05:57:33 -04:00
Jaroslaw Palczynski
2c16d2b417 FStringAssetReference fixes.
All changes regarding e-mail discussion titled "Asset registry shenanigans".

Changes:
1. Engine now actively is getting rid of short asset paths in FStringAssetReference during saving (for all packages) and loading (only for older packages).
2. Deprecated direct access to FStringAssetReference.AssetLongPathname and exposed it via ToString and SetPath -- SetPath is making sure the path is in correct format. If the path can't be found on disk, the path is cleared.
3. Also access to FStringAssetReference.AssetLongPathnam via Blueprints is guarded using custom Make node function that uses SetPath instead of simple assign.
4. StringAssetReferenceMap will now contain only paths to packages (not objects) and ini references
5. GetDependencies now has additional parameter that lets you chose if it should resolve ini references or not. It was left not as default to keep old behaviour.

[CL 2630589 by Jaroslaw Palczynski in Main branch]
2015-07-23 10:49:29 -04:00
Daniel Lamb
51ed50e7da Fixed crash in asset registry when dependency info is missing.
[CL 2627785 by Daniel Lamb in Main branch]
2015-07-21 14:15:33 -04:00
Daniel Lamb
d2d0c42f50 Fixed compilation error.
[CL 2627754 by Daniel Lamb in Main branch]
2015-07-21 14:01:45 -04:00
Daniel Lamb
eb3a758739 Fixed asset registry crashing if no harddependencies are found.
[CL 2627747 by Daniel Lamb in Main branch]
2015-07-21 13:58:52 -04:00
Bob Tellez
a928f35158 [AUTOMERGE]
#UE4 Softer error handling when reading the asset registry cache. All errors will just cause the cache to regenerate.

--------
Integrated using branch Ue4-To-UE4-Fortnite-Simple (reversed) of change#2622128 by Bob.Tellez on 2015/07/15 14:34:24.

[CL 2622133 by Bob Tellez in Main branch]
2015-07-15 14:35:20 -04:00
Jamie Dale
7c53e46f78 Changed the asset registry discovery to avoid some redundant copies and conversions
It would previously find an FAssetData in the cached asset registry, and then pass it to FBackgroundAssetData which would copy the tags and values map, and perform at least 6 FName -> FString conversions, before ultimately converting all of these FStrings back to FNames when FBackgroundAssetData::ToAssetData was called.

This change makes FBackgroundAssetData implement an interface (IGatheredAssetData), and adds FAssetDataWrapper to more efficiently wrap up an FAssetData that was read from the cached asset registry.

This saved 2-3 seconds when loading the largest project I have available (previously ~18 seconds, now ~15 seconds).

[CL 2620726 by Jamie Dale in Main branch]
2015-07-14 15:46:58 -04:00