Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting MUA & XML2 tabs is delayed #10

Open
ak2yny opened this issue Jul 15, 2023 · 4 comments
Open

Selecting MUA & XML2 tabs is delayed #10

ak2yny opened this issue Jul 15, 2023 · 4 comments
Labels
help wanted Extra attention is needed performance Low performance, slow processes, commands with low performance

Comments

@ak2yny
Copy link
Owner

ak2yny commented Jul 15, 2023

Switching between pages, especially MUA & XML2 pages takes a moment (does it depend on the system?).
Especially during debug?

We can add chache to pages (in xaml), like this:

    NavigationCacheMode="Required"

But adding this to the XML2 an MUA pages doesn't solve the issue. Adding it to the settings page creates a bug, where the settings won't update when the game was changed (opening settings isn't delayed much).
Info is not delayed so adding a cache is not effective there.

It's possible that this issue is related to #8 as the affected pages use multiple ObservableCollections.

@ak2yny ak2yny added help wanted Extra attention is needed performance Low performance, slow processes, commands with low performance labels Jul 15, 2023
@ak2yny
Copy link
Owner Author

ak2yny commented Jul 31, 2023

After fixing issue #8 this seems to be slightly improved. There still is a delay, however, and it seems like save and load as well as populating each list together are responsible. Save and load (including populating the selected list) is too big of a benefit to change, so this is not going to change in the foreseeable future.

A solution is to keep two separate selected lists for each game. It remains to be seen, if this really improves performance though. It's also a complicated task to filter the first time load (the roster should still be loaded when the GUI starts).

@ak2yny
Copy link
Owner Author

ak2yny commented Jan 7, 2024

Adding this here, since it's related:
The new Teams tab is also delayed. Parsing the XML element to the custom observable collection (max. 32 x 8 loops) seems to take a long time. I don't know how one would serialize an XML to a list normally and if this would be faster.

Update: After changing the code, where deserialization wouldn't happen when switching to the page, loading is still delayed.

@ak2yny
Copy link
Owner Author

ak2yny commented Jan 9, 2024

Having separate lists doesn't seem to help for the teams, so I'm scratching that idea. The only remaining idea is cache (at this time). And cache disables initialization when opening a new tab, which is required in most/all cases (sometimes even prevents builds from completing successfully).

@ak2yny
Copy link
Owner Author

ak2yny commented Jan 15, 2024

I made some tests, and even though reading and writing settings from files takes a little while, it's not what really seems to delay the loading. The observable properties are updated and ready at the time when I notice the site being delayed (on initialization).
It seems like loading the UI is taking the most time. It may depend on the bindings or lists (tabs seem to load faster with empty lists), especially lists with a data template. I don't know if this can be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed performance Low performance, slow processes, commands with low performance
Projects
None yet
Development

No branches or pull requests

1 participant