script-lab
script-lab copied to clipboard
Make Custom Functions AsyncStorage communication more efficient
After porting over the existing CF AsyncStorage custom functions logic, should do the following improvements:
- Only write to local storage if a dashboard is present.
- 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).
- Make sure that even if fail to write to storage, that function still works.
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.