[LEDE-DEV] Call defines for minifying scripting languages

Karl Palsson karlp at tweak.net.au
Mon Oct 3 04:14:06 PDT 2016


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.

> 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.

Sincerely,
Karl Palsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20161003/26e061e9/attachment.sig>


More information about the Lede-dev mailing list