From 048a042ffa0f6a0254dfbed79ca5281704073496 Mon Sep 17 00:00:00 2001 From: Richard de Boer Date: Fri, 3 Apr 2020 21:32:05 +0200 Subject: [PATCH] Revert "Settings: load app settings in their own scope" > Actually eval('('+appSettings+')') is significantly worse I'm afraid. > > Basically, if you do Storage.read you get a pointer to external memory > Any functions have their code kept in that memory so it saves loads of > RAM. The second you append to the string it has to copy everything to > RAM - so now every function ends up in RAM, not Flash :( This reverts commit c135c70f --- apps/setting/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/setting/settings.js b/apps/setting/settings.js index 38ce9f886..dbb03555c 100644 --- a/apps/setting/settings.js +++ b/apps/setting/settings.js @@ -323,7 +323,7 @@ function showAppSettings(app) { return showError('Missing settings'); } try { - appSettings = eval('('+appSettings+')'); + appSettings = eval(appSettings); } catch (e) { console.log(`${app.name} settings error:`, e) return showError('Error in settings');