[LEDE-DEV] Call defines for minifying scripting languages

Jan-Tarek Butt tarek at ring0.de
Mon Oct 3 07:00:34 PDT 2016

On 10/03/16 13:14, Karl Palsson wrote:
> Jan-Tarek Butt <tarek at ring0.de> wrote:
>> Hi,
>> My Idea ist to create calldefs to minify all scriptes there are
>> interpreted by run time.
>> As example see the mail "[PATCH] LuaSrcDiet call define for lua
>> code Minifying".
>> I plan to write also calldefs for shellscripts, python and
>> perl.
>> They brings vareous of features.
>> 1. Reducing memory size on firmware images.
> But will it? They're in the squashfs image, it's already been
> demonstrated before that compressing things before can actually
> have negative impacts.

The minifing proces is on compile time so I cant see negative
impacts for the squashfs.

>> 2. Strip out all comments (which makes us able to do better
>> code commenting) 3. and so on.
>> One negative point will be there:
>> the minified code an not realy human readable but if some one
>> want to read this script or work on it on routers, they can
>> easily copy the unminified script via scp.
> This is a _massive_ downside IMO, and absolutely not something
> that should be enabled by default. There's already far too much
> undocumented/underdocumented internal behaviours of scripts and
> processes in LEDE/OpenWrt, and minifying scripts and stripping
> comments actively works to preserve that situation.

Sorry I think I have formulated it wrong.

Inside the git we can documented the code and while the compile
process the comments will drop from all shellscrips who run the
calldef in its makefile.

so only on the finish compiled images are the minified scripts.

and of cause this is optionaly and looks like this [0]. So you
can just call ist inside the package Makefile.

[0] https://lists.ffnw.de//pipermail/dev/2016-July/001444.html


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161003/8a166e60/attachment.sig>

More information about the Lede-dev mailing list