-
• #2
As much as your coding practice is laudable,... it is challenging the memory constraint, since it is not compiling to byte or token code and interpret it but it does it all from source. Simple minification helps to get rid of the comments and the long variable names that have function / block scope. Other than that it cannot handle more compression (short names) without more meta information. Globals - variables and functions have to be the same if you minify multiple files individually. Building protytpes(/classes) and as short as possible functions(methods) and - if data and process separated - have data-objects with short as possible property names helps with space. Comment is never and issue. What helps as well is putting the code into a modules and used these minified.
-
• #3
There's actually an issue open to add some very basic minification here: https://github.com/espruino/BangleApps/issues/3
Issue #3 so it's been going for a while. It's very high up my list so it should be done soon, but right now I spend a good 80% of my time answering emails so I'm not getting much time to enable it :(
I experienced problems with the settings.js file when using minification. My guess is that is because variable names are not consistent anymore between files. Could that be?
I don't think that should be it - not unless you used some really serious minification. Usually it only touches variable names when it's 100% sure they can be changed
Hi,
I am using rather long variable names and a lot of long comments in my code. This is to make it as readable as possible.
Downside: The code gets very big and I run into memory problems too early.
When uploading the code, I am using minifying to reduce the size.
Two questions:
Thanks
Christian
Thanks