dotnet / dotnet/docs-maui

Performance document should be updated with latest recommendations

Open
#2,874 1 comment 1 reaction 3 assignees Claimed by @davidortinau View on GitHub
doc-enhancement dotnet-maui/subsvc dotnet-mobile/svc Pri1
Dominant language
No language data
Stars
282
Forks
265
Avg merge
2d 2h
Merged PRs (30d)
19

Description

### Type of issue

Out of Date Information

### Description

1) ListView section should tell users to just use CollectionView and we should call out not using it inside a "StackLayout"
2) Review these recommendations around image handling
- https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-9.0#optimize-image-resources
3) Should we put this on the doc? https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-9.0#create-shell-apps or possibly add additional context? We don't want to necessarly trigger people to think that converting to shell will magically fix performance issues
4) Task suggestions https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-9.0#fundamentals
- Should we mention Task.Run? Should this section just refer out to other async/await documentation?
- We should probably add a section about making sure to await everything and never just call an async method
- Review this suggestion "Use the Task.Delay method to produce a Task object that finishes after the specified time. This is useful for scenarios such as polling for data, and delaying handling user input for a predetermined time. For more information, see [Task.Delay](https://learn.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/consuming-the-task-based-asynchronous-pattern#taskdelay)."
5) update this documentation to refer to `CollectionView` and indicate recommendations about not using an ObservableCollection. We should also discourage users from depending on the auto marshalling behavior of CV
6) Include documentation around `IDisposable` and how it shouldn't be used on transient services. https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-9.0#release-idisposable-resources https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection-guidelines#recommendations

### Page URL

https://learn.microsoft.com/en-us/dotnet/maui/deployment/performance?view=net-maui-9.0

### Content source URL

https://github.com/dotnet/docs-maui/blob/main/docs/deployment/performance.md

### Document Version Independent Id

5845bd05-2151-862c-9b29-1d76664a9f0d

### Platform Id

ed86303e-6644-339a-3af0-abd3ffb65a76

### Article author

@davidbritch

### Metadata

* ID: 5845bd05-2151-862c-9b29-1d76664a9f0d
* PlatformId: ed86303e-6644-339a-3af0-abd3ffb65a76
* Service: **dotnet-mobile**
* Sub-service: **dotnet-maui**

[Related Issues](https://github.com/dotnet/docs-maui/issues?q=is%3Aissue+is%3Aopen+5845bd05-2151-862c-9b29-1d76664a9f0d)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.