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

Dont create pages' data-context until navigation #1153

Open
Xiaoy312 opened this issue Aug 1, 2024 · 0 comments
Open

Dont create pages' data-context until navigation #1153

Xiaoy312 opened this issue Aug 1, 2024 · 0 comments
Labels
kind/consumer-experience Categorizes issue or PR as related to improving the experience of consumers kind/enhancement New feature or request. kind/performance Categorizes issue or PR as related to improving performance (allocations/memory/init/etc) kind/sample Represents an issue or PR with a sample

Comments

@Xiaoy312
Copy link
Contributor

Xiaoy312 commented Aug 1, 2024

What would you like to be added:

   at Uno.Gallery.Sample.CreateData(Type dataType)
   at Uno.Gallery.Sample..ctor(SamplePageAttribute attribute, Type viewType)
   at Uno.Gallery.App.GetSamples()
   at Uno.Gallery.App.AddNavigationItems(NavigationView nv)
   at Uno.Gallery.App.BuildShell()
   at Uno.Gallery.App.OnLaunchedOrActivated()
   at Uno.Gallery.App.OnLaunched(LaunchActivatedEventArgs e)

We are currently instantiating all data-contexts, that we ever need, the moment we are launching the app...
This should've delayed until the navigation actually occurs; build one as we need, and not the whole batch.

Why is this needed: general performance

For which Platform: any

Anything else we need to know?

This should also fix the problem of, data-context being shared between navigation.
Would this may sound correct, it is NOT the behavior we expect.

Additionally, we should also check if themes' and toolkit's weren't suffering the same fate.

@Xiaoy312 Xiaoy312 added kind/consumer-experience Categorizes issue or PR as related to improving the experience of consumers kind/enhancement New feature or request. kind/performance Categorizes issue or PR as related to improving performance (allocations/memory/init/etc) kind/sample Represents an issue or PR with a sample labels Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/consumer-experience Categorizes issue or PR as related to improving the experience of consumers kind/enhancement New feature or request. kind/performance Categorizes issue or PR as related to improving performance (allocations/memory/init/etc) kind/sample Represents an issue or PR with a sample
Projects
None yet
Development

No branches or pull requests

1 participant