setViewNode hangs RV 2022 for more than 50 media items

I have a list of 50+ media list items which I want to play as sequence in RV 2022.
Below is my code which hangs at setViewNode:

group_node = commands.newNode(“RVSequenceGroup”, “RVSequenceGroup1”)
source_nodes =
for media in medias: source_nodes.append(commands.addSourceVerbose([media], ‘explicit’))
top_level_source_nodes = [commands.nodeGroup(node) for node in source_nodes]
commands.setNodeInputs(group_node, top_level_source_nodes)

Is there any way to resolve this?