msarilar / EDEngineer

An overlay to track Elite Dangerous blueprints progress in real time
MIT License
503 stars 175 forks source link

Optimize EDEngineer #715

Open Mc-Pain opened 1 year ago

Mc-Pain commented 1 year ago

ED Engineer operates very slow, especially on large shopping lists.

There are some bottlenecks and excessive operations when updating UI or importing/clearing shopping lists.

For example: Multiple calling this.ToList(), which calculates a new object while we can store it somewhere if it's unchanged. Updating UI or saving settings when importing or clearing shopping list (both are time expensive)

[source branch was renamed]

Mc-Pain commented 1 year ago

@msarilar There are some benchmarks:

Tried to apply a shopping list with every blueprint included 10 times with commit f1ec43caf65662d58499bbb5a48878e943eb3b4a -- after 30 minutes application freezes (no GC happens, I heavily suspect OutOfMemoryException)

Given my optimizations, import took ~20 seconds if you had almost empty shopping list before and choose to clean it.

msarilar commented 1 year ago

Nice thank you will try and review soonOn 12 Dec 2022, at 11:56, Mc-Pain @.***> wrote: @msarilar There are some benchmarks: Tried to apply a shopping list with every blueprint included 10 times with commit f1ec43c -- after 30 minutes application freezes (no GC happens, I heavily suspect OutOfMemoryException) Given my optimizations, import took ~20 seconds if you had almost empty shopping list before and choose to clean it.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Mc-Pain commented 1 year ago

This should be resolved ASAP - that's why I took the attempt to optimize.

https://github.com/msarilar/EDEngineer/issues/646

Mc-Pain commented 1 year ago

ping?

Mc-Pain commented 1 year ago

@msarilar maybe your help is needed to optimize increment/decrement shopping list.

What happens exactly when user/EDEvent changes shopping list? Profiler data led me that hottest path contains system code. I suspect heavily messing with events subsystem or unoptimal XAML handling