Skip to content

Editor freezes when some subsystems are selected #5

@Filip-Anicic

Description

@Filip-Anicic

When selecting my subsystem, the editor would freeze for a long period of time. This video was cut short, because it seemed the only way to resume working is to close and restart the editor. Same thing happened when I selected the Actor partition subsystem in the tree view.
https://user-images.githubusercontent.com/23241818/182373106-16235ce1-1ae0-4168-833d-3876c6da9772.mp4

The subsystem consists of multiple arrays of components, actors, FGuid's and a TMap<FGuid, CustomStruct>

//properties
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<ASLDDevice*> Devices;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<USLDPortComponent*> OriginPortComponents;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<USLDPortComponent*> PortComponents;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<FGuid> PortIDs;
	//TODO: Swap to sorted map, since it should be faster for smaller data sets
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TMap<FGuid, FPortData> PortMap;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<USLDNetwork*> Networks;
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "SLDynamics")
	TArray<FSLDConnection> Connections;

and the struct inside the map is just this

USTRUCT(BlueprintType)
struct FPortData
{
	GENERATED_BODY()
	FPortData() { }
	FPortData(USLDPortComponent* PortComponent)
	{
		component = PortComponent;
	}
	FORCEINLINE bool operator==(const FPortData &Other) const
	{
		return (component == Other.component) && (connections == Other.connections);
	}
	
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SLDynamics")
	USLDPortComponent* component;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "SLDynamics")
	TArray<FGuid> connections;
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions