Commit Graph

318 Commits

Author SHA1 Message Date
yoan stamant
116752fb4b [Backout] - CL33350390
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33355094 by yoan stamant in ue5-main branch]
2024-04-30 17:35:49 -04:00
yoan stamant
bdfef806dd [StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33353516 by yoan stamant in ue5-main branch]
2024-04-30 17:07:24 -04:00
logan buchy
7e550e71fc [Backout] - CL33242681
[FYI] marshall.beachy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33319481 by logan buchy in ue5-main branch]
2024-04-30 01:05:58 -04:00
yoan stamant
218566e2aa [StateTreeDebugger] fixed timelines reused for the same instances through multiple traces taken during the same game session
#rb mikko.mononen

[CL 33266685 by yoan stamant in ue5-main branch]
2024-04-26 12:01:04 -04:00
alex kahn
b9d237ef29 [Backout] - CL33240386 - CIS Compile Error
#rnx
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33254605 by alex kahn in ue5-main branch]
2024-04-25 21:28:43 -04:00
logan buchy
fc52e2fa82 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33242716 by logan buchy in ue5-main branch]
2024-04-25 16:00:45 -04:00
yoan stamant
e56181f258 [StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33241614 by yoan stamant in ue5-main branch]
2024-04-25 15:30:44 -04:00
yoan stamant
d6b45687f8 [Backout] - CL33232683
[FYI] Yoan.StAmant
Original CL Desc
-----------------------------------------------------------------
[StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33234412 by yoan stamant in ue5-main branch]
2024-04-25 12:20:47 -04:00
yoan stamant
6ca12a2bbf [StateTreeDebugger] enabled debugger on all desktop platforms
#jira UE-192305
#rb mikko.mononen

[CL 33233540 by yoan stamant in ue5-main branch]
2024-04-25 11:52:56 -04:00
robert millar
113e467dce Backing out to avoid crash opening some assets with instanced structs.
[Backout] - CL33171468
[FYI] logan.buchy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33205050 by robert millar in ue5-main branch]
2024-04-24 13:31:59 -04:00
logan buchy
6a08f9cc13 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33171500 by logan buchy in ue5-main branch]
2024-04-23 12:26:48 -04:00
logan buchy
e92a21f90b [Backout] - CL33154533
[FYI] logan.buchy
Original CL Desc
-----------------------------------------------------------------
Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33161624 by logan buchy in ue5-main branch]
2024-04-23 00:48:23 -04:00
logan buchy
f0ce334aa6 Performance improvement for nested FInstancedStruct in details panel
* Pathological performance issues occurred when viewing/editing USTRUCT objects that nested FInstancedStruct (either directly or in containers).  The PropertyNode system's implementation when handling FInstancedStructs would recurse up the property tree to discover the address of the owning objects and then recurse again up with the starting address.  The root cause of the performance issue is that the recursion would branch on the way up in the following functions: GetInstancesNum, GetMemoryOfInstance, GetOwnerPackages, HasValidStructData (by way of IsValid). On the way up again, branches would occur in GetValueBaseAddress, via duplicate calls in FItemPropertyNode::GetValueBaseAddress to ParentNode->GetValueAddress.
* The problem has been addressed by having the StructPropertyNode handle StructProviders that perform indirection differently than other providers.  When indirection is present, walk up to the parent node of the struct which will be an ItemPropertyNode - the address of this is retrieved and passed back down to the StructProvider.  In the current codebase, the FInstancedStructProvider is the only one that does this type of indirection - it can make the assumption that the passed in address is an FInstancedStruct and thus reinterpret it to get the StructMemory and UStruct* pointers.
* Added an InternalGetReadAddressUncached which public GetReadAddress** functions will call.  This new function will not resolve the Struct in the case of a Struct property indirection unlike GetReadAddressUncached.  It is intended as an internal function only to be called by the public APIs.
* Added a safeguard canary value to FInstancedStruct to debug/catch cases where the wrong raw void* is reinterpreted as an FInstancedStruct.  FInstancedStruct::CastFromVoid helper should be used over a naked reinterpret_cast
* Note that it isn't guarantees all paths where slow recursive behaviour occurs has been addressed in this CL. Specifically, the InstancedStructDetails implementations to get the dispaly values still go through the data enumeration though it should be better now that GetInstancesNum and GetMemoryOfInstance are not recursively calling the Enumerate pathways.  See GetDisplayValueString, GetTooltipText, GetDisplayValueIcon, GenerateStructPicker - this is the primary expense in Slate that is probably causing additional performance loss.

#rb mikko.mononen
#jira UE-207555

[CL 33154559 by logan buchy in ue5-main branch]
2024-04-22 18:20:14 -04:00
yoan stamant
9f4886944e [StateTreeDebugger]
allowed to provide verbosity to STATETREE_TRACE_LOG_EVENT and STATETREE_LOG_AND_TRACE so the debugger can add custom icons accordingly.
#jira UE-210505
#rb mikko.mononen

[CL 33140307 by yoan stamant in ue5-main branch]
2024-04-22 11:34:53 -04:00
yoan stamant
3388249fae [StateTreeDebugger] some layout tweaks to allow users to reduce all panels completely.
Also replaced the scrollbars for the Events TreeView by external ones to make sure both are visible when the window is too small in both dimensions.
Fixed edge case in SSimpleTimeSlider when receiving negative 'PixelsPerInput'
#jira UE-207599
#rb mikko.mononen

[CL 33138507 by yoan stamant in ue5-main branch]
2024-04-22 10:40:06 -04:00
mikko mononen
533e9f7eb7 StateTrees: Made empty linked asset a valid setup.
[CL 33135868 by mikko mononen in ue5-main branch]
2024-04-22 07:44:19 -04:00
mikko mononen
641d865e90 StateTrees: Fixed skipping last property in edit chain during PostEditProperty dispatch.
[CL 33135614 by mikko mononen in ue5-main branch]
2024-04-22 07:07:04 -04:00
yoan stamant
5ece772a6b [StateTreeDebugger] Moved Breakpoint commands to ViewModel and main TreeView
#jira UE-211174
#rb mikko.mononen

[CL 33108338 by yoan stamant in ue5-main branch]
2024-04-19 13:14:25 -04:00
yoan stamant
8f73653f92 [StateTreeDebugger]
- new recording started from the debugger will be selected as the new active analysis
- allow multiple recordings during the same PIE session to reactive existing tracks
- do not apply trace selection if user reselect the current trace to avoid clearing data
#jira UE-207595
#jira UE-207406
#jira UE-207414
#rb mikko.mononen

[CL 33099625 by yoan stamant in ue5-main branch]
2024-04-19 07:51:55 -04:00
mikko mononen
19bc060246 StateTree: Added support for description and icon for BP nodes.
#rb Thomas.Sarkanen, Yoan.StAmant

[CL 33098383 by mikko mononen in ue5-main branch]
2024-04-19 05:44:13 -04:00
mikko mononen
b5f3e45d9b StateTree: Debugger fixes and improvements
- Another fix for stuck timeline
- Removed exec context to emit  EStateTreeUpdatePhase::TickStateTree scope, to allow cleaner logs for parallel STs

[CL 33030889 by mikko mononen in ue5-main branch]
2024-04-17 04:18:52 -04:00
mikko mononen
ef148ecd80 StateTree: StateTree UI spring clean.
- Added icons and icon colors for ST nodes
- Implemented icons for some common ST nodes
- Small update to ST logic icons
- Added icons to the task list in State treeview row, adjusted task list BG color to make icons visible
- Fixed ST editor tabs icons and names (e.g. there were two tabs that had the same label)
- Moved ST node picker to separate class
- Moved category array customization to common helper function
- Added node icons to the ST node picker
- Add node button is not node selector too (simila to Niagara)
- Consolidated the add button style across all lists
- Cleaned up the node customization
  - Moved type selector, debug, and property controls into one menu at right
  - The combined menu can be also summoned using right click
  - Renaming now has to be triggered via the menu
  - Replacing node happens via menu
  - Most of the row was left "clickable" to later use it for selection
  - Improved the visualization and controls for the expression indentation
- Cleaned up state customization
  - Moved parameters to own category (similar to the tree params)
  - Moved event to the enter conditions category
- Cleaned up transition customization
  - Improved the transition display
  - Consolidated add button styles

#jira UE-180608
#rb Juan.Portillo, Mieszko.Zielinski

[CL 33030431 by mikko mononen in ue5-main branch]
2024-04-17 03:01:36 -04:00
jacob wang
ab360118e2 [State Tree] Added icon for random selection
#jira UE-212343
#rb mikko.mononen

[CL 33006569 by jacob wang in ue5-main branch]
2024-04-16 13:32:28 -04:00
guillaume arruda
4f79176477 Add compile in StateTree PostLoad and compile on PIE begin to state tree so that the trees are never out of sync with the editor state in game
Add validation warning if the state tree is not compiled to prevent uncompiled state tree to be submitted
#rb mikko.mononen

[CL 33001894 by guillaume arruda in ue5-main branch]
2024-04-16 11:14:34 -04:00
mikko mononen
1b8b7b68ed StateTree: Fixed duplicate localizations strings.
#jira UE-212181

[CL 32997038 by mikko mononen in ue5-main branch]
2024-04-16 07:17:16 -04:00