Skip to content

Performance improvements for many characters#113

Open
cryonox wants to merge 6 commits intomgoeppner:mainfrom
cryonox:main
Open

Performance improvements for many characters#113
cryonox wants to merge 6 commits intomgoeppner:mainfrom
cryonox:main

Conversation

@cryonox
Copy link

@cryonox cryonox commented Feb 26, 2026

These are a series of improvements for characters more than 30+ where evemon either crashes or take over 3-4 minutes(bruh!) before it can even become responsive! With the fixes the same 30+ character set finshed loading in 10 second, a 24x improvement.

  1. Fix IndexOutOfRangeException on concurrent collection modification — Snapshot lists (.ToList() / .ToArray()) before iterating in industry job notification, IndustryJobCollection, and GlobalNotificationCollection where timer ticks or re-entrant ThreadSafeInvoke could mutate mid-iteration. Also fixed race condition in EveIDToNames where it can trigger io excptions.

  2. Lazy-load CharacterMonitor controls — Only create the heavy CharacterMonitor when a tab is first selected, not upfront for every character. Same treatment for KillLogCollection cache and TimerTick subscription. Header/footer now self-populate on load so they aren't blank.

  3. Coalesce redundant UI updates — Overview sets a dirty flag and flushes on TimerTick instead of rebuilding per character update. MonitoredCharactersChanged fires once after import, not per character. LayoutTabPages batches tab changes via SuspendLayout/Clear/AddRange/ResumeLayout instead of per-tab Insert/Remove. Think of it this way, the liberal use of event driven design during initial startup force many updates to UI thread via ThreadSafeInvoke. This change instead delay and group the updates via one second ticks from the dispatcher instead of allowing simultaneous UI updates.

  4. Guard ThreadSafeInvoke against disposed controls — Skip BeginInvoke/EndInvoke when the target control is already disposed or has no handle. Else this could throw IndexOutOfRangeException.. During startup if you resize the control, it seems this does not prevent this error. So another commit to conditionally catch this if it slipped through the guard.

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.

1 participant