script-lab icon indicating copy to clipboard operation
script-lab copied to clipboard

Make Custom Functions AsyncStorage communication more efficient

Open Zlatkovsky opened this issue 7 years ago • 1 comments

After porting over the existing CF AsyncStorage custom functions logic, should do the following improvements:

  1. Only write to local storage if a dashboard is present.
  2. Rather than constantly writing (in a loop), only write when a new entry is ready to be written. (Did a loop because it looked like some other keys were being written to as well, like the heartbeat last-alive moment -- but it looks like those aren't used anymore. So clean up and make more efficient instead).
  3. Make sure that even if fail to write to storage, that function still works.

Zlatkovsky avatar Oct 08 '18 23:10 Zlatkovsky

I believe the AsyncStorage implementation already is more efficient in the new Script Lab than in the old one, since it comes from a refactored version at https://github.com/OfficeDev/script-lab-2017/compare/CleanerAsyncStorage/

However, that reminds me that we should port over that precompiled source back into the Script Lab of today. Opening https://github.com/OfficeDev/script-lab/issues/523 for it.

Zlatkovsky avatar Dec 31 '18 22:12 Zlatkovsky