SOLVED

optimize your code

Copper Contributor
How would you optimize your code for Mobile
6 Replies
Could you be more specific?
Part of me wants to just post the unhelpful response, which is "write less of it, because less code runs faster". That part won.

But then another part of me decided it would be friendlier to ask what exactly you mean - are you speaking of writing Universal Windows Apps that perform better on Mobile, or web apps that perform well on mobile web browsers as well as desktop browsers, or...? It's a really vague question we're struggling to get you a good answer to...
well as we know microsoft mobile is different from desktop applications so you have to be careful with the battery life and everything else so what implementations would you can see there when you're being an app for mobile device
As a developer I want to know how can i optimize when building for a mobile platform vs a desktop. There are different practices
best response confirmed by Eduardo Gomez Romero (Copper Contributor)
Solution
Lots of information on that here: https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/performance-and-xaml-ui - in general, it is about being really careful with the code that you write, and using the CPU sparingly. Lots of work has been done on asynchronous code development, as probably the biggest CPU burner I've come across recently is wait loops "are you done yet? are you done yet? are you done yet? are you done yet?"
When you build an app, the most important part, that i want to consider is battery life? I would presume that making an app, that requires internet and constantly asking the user if they have internet, would impact the battery life. If so how can Microsoft Word do this and not drain to much
1 best response

Accepted Solutions
best response confirmed by Eduardo Gomez Romero (Copper Contributor)
Solution
Lots of information on that here: https://docs.microsoft.com/en-us/windows/uwp/debug-test-perf/performance-and-xaml-ui - in general, it is about being really careful with the code that you write, and using the CPU sparingly. Lots of work has been done on asynchronous code development, as probably the biggest CPU burner I've come across recently is wait loops "are you done yet? are you done yet? are you done yet? are you done yet?"

View solution in original post