Long PIE startup stall after opened Behavior Tree Editor

FGraphNodeClassHelper::InvalidateCache is bound to GEditor->OnBlueprintCompiled(), so it runs once per compiled Blueprint. It refreshes the observed Blueprint class counts via UpdateAvailableBlueprintClasses, which can rebuild the entire class inheritance map.

Anything that compiles Blueprints in bulk therefore pays that cost per Blueprint. The Behavior Tree Editor registers three observed classes, so once a Behavior Tree Editor has been opened, every later PIE start rebuilds the inheritance map three times per compiled Blueprint — for the rest of the editor session.

On a project with a large number of Blueprints this becomes severe. In our editor, PIE startup takes 10+ minutes; with this change it drops to under 30 seconds.

I’ve submitted a pull request to ue5-main fixing this, and would appreciate a review. More detail in the PR description.

PR: https://github.com/EpicGames/UnrealEngine/pull/15057

[Attachment Removed]

Steps to Reproduce
This is a performance issue that might not be reflected in a template project, as the cost only becomes visible with a large number of Blueprints. Repro steps in nay project with a substantial number of Blueprints:

  1. Open a Behavior Tree asset
  2. Start a PIE session

`FGraphNodeClassHelper::InvalidateCache` then runs per compiled Blueprint, each time issuing asset registry queries that can rebuild the entire class inheritance map. In our editor this took PIE startup from 30 seconds to 10+ minutes. Add debugging logs should help identify the class inheritance map rebuild counts.

[Attachment Removed]

Thank you for letting us know! I know there has been a push for automatically compiling BPs when launching PIE or cooking so that any changes show up even if a user forgot to click compile before PIE. I do see the PR in our JIRA, but it has not yet been assigned to a dev on the team. I made a note on our JIRA about this thread in case they have any questions.

-James

[Attachment Removed]