Skip to content

Fix slow lookup suggestions when editing game configuration - #1253

Merged
sven-n merged 1 commit into
masterfrom
claude/vigilant-volta-jrsrno
Oct 19, 2026
Merged

sven-n merged 1 commit into
masterfrom
claude/vigilant-volta-jrsrno

Conversation

@sven-n

@sven-n sven-n commented Oct 19, 2026

Copy link
Copy Markdown
Member

Fixes #1223

Problem

PersistentObjectsLookupController.GetSuggestionsAsync only used the already loaded objects of the game configuration data source when the passed context did not support the searched type. Pages like Merchants, item drops, cash shop and the config edit pages pass the data source's own context, which supports every configuration type. So on every keystroke the lookup ran context.GetAsync<T>(), loading the whole object graph (e.g. all item definitions) from the database into a context that already tracks the complete game configuration. That's what pegged one core for up to minutes.

Fix

If the passed context is the game configuration data source's own context, the suggestions now come from GetAll<T>() on the already loaded configuration. These are the same tracked instances, so assigning a selected object still works. Other contexts (e.g. typed contexts created for non-config edits) are still queried as before.

Testing

  • Added PersistentObjectsLookupControllerTests. The new test fails without the fix and passes with it.
  • All 281 tests in MUnique.OpenMU.Web.Tests pass.
  • I haven't checked the admin panel against a real PostgreSQL database.

Generated by Claude Code

When a lookup field was bound to the context of the game configuration
data source (e.g. merchant stores, item drops, config edit pages), the
suggestions were queried from the database on every keystroke, loading
the whole object graph into a context which already tracks the complete
configuration. Now the already loaded objects of the data source are
used in that case.

Fixes #1223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018GYsgGD7aoTDMXciEfStgZ
@sven-n
sven-n merged commit f883f4a into master Oct 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin panel: looking up a game object (item, NPC, monster etc.) takes several minutes, openmu-startup CPU at ~110%

2 participants