Editor hangs due to repeated saving of EditorPerProjectUserSettings

We are observing Editor hangs, in particular when closing tabs or windows. During our investigation we learned that the Editor stores the position of windows and the like in EditorPerProjectUserSettings.ini.

  • Under the hood it atomically rewrites that entire file every time you close a tab or window.
    • In my repro I close a window with 10 tabs, causing the editor to rewrite that file 10 times, taking ~13 seconds before I can interact with the Editor again.
  • The expensive part is not storing the position of the tabs and windows, or other useful information, but the state (expanded or not) for every property in every details view you ever looked at!
    • In my case that file had grown to 14+MB, hence the delay when rewriting it 10 times, and waiting and blocking the entire editor until all 10 writes are complete …

To help with that I added:

  • a MaxDetailsPanelCacheEntries EditorSetting that limits the file to the 200 last used entries.
    • This is very conservative judging by the amount of entries I had in my .ini, and you can lower it further if you want even less delay, and don’t care about whether the advanced settings of some random details view are restored to being expanded or not…
  • and logic to debounce those writes (when multiple writes are triggered within 0.1s only the last one is actually executed).

Overall we get smaller writes and less writes, so the hang when closing the window reduces from 13 sec to <1 sec.

In particular we are capping the number of entries for

DetailCustomWidgetExpansion,

DetailPropertyExpansion,

DetailCategories,

DetailCategoriesAdvanced,

DetailMultiObjectNodeExpansion, and

AssetEditorToolkitTabLocation.

This change works well enough for us, but there are still issues with SDetailsViewBase::SaveExpandedItems adding many redundant entries.

[Attachment Removed]

Steps to Reproduce
Have a sufficiently large EditorPerProjectUserSettings file (mine is 14MB)

Open 10 blueprints as tabs in the same window.

Close that window

-> The editor hangs for 10+ seconds

[Attachment Removed]

Hi Christian,

Thanks for the in-depth report. I’ve logged a Jira for the team to investigate this further.

Best regards,

Anousack

[Attachment Removed]

We are also having the same issue, if i close 10 tabs, it stalls for a long time because it keeps trying to delete that file on doing the most random things

[Attachment Removed]