I noticed that whenever I use Office365Users.MyProfile() function it makes calls every time I uses it, and I do use it quite a lot in my application (like on every screen few times). That slows down my app as every time it asks for same information and wait until it loads. I was wondering is it possible to call Office365Users.MyProfile() function once the App is launched and reuse that info through the app without calling it ever again (or keeping it while the users session is active so that it connects to Office365 network only once per user session). Is there any practices of how to create temporary variables which keep their record for individual sessions while the users is using the App?
I am looking for something like this:
On App Launch: UsersProfile() = Office365Users.MyProfile();
And then instead of using Office365Users.MyProfile()
I could use UserProfile() instead which is local variable and does not connect to external data every time.
Any other tips for improving efficiency also welcome! Thanks!

Report
All responses (
Answers (