lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


…did you make any measures of how much memory can we save using this tool?

The goal of LuaSrcDiet is to reduce size of Lua files on disk, not memory usage. That’s interesting for embedded systems or when you want to embed Lua sources into small static binary. I don’t know if it has any real effect on memory usage, probably not.

Kein-Hong Man made nice measurements and comparisons that you can find in https://github.com/jirutka/luasrcdiet/blob/master/doc/performance-stats.adoc.

Jakub

On 21. Jun 2017, at 12:21, Miha Cooper <mihakuper@gmail.com> wrote:

Hi, Jakub!

This tool looks pretty cool, did you make any measures of how much memory can we save using this tool? Maybe examples for some existing open-source projects?

On 21 June 2017 at 12:59, Jakub Jirutka <jakub@jirutka.cz> wrote:
Hi,

I’d like to announce that I’ve adopted project LuaSrcDiet and released version 0.3.0. You can install it from LuaRocks [1] or fetch tarball from the repository [2]. The most important change is support for Lua 5.2 and 5.3. You can read about all notable changes in the changelog [3].

LuaSrcDiet is a minification tool for Lua, it reduces size of Lua source files by aggressively removing all unnecessary whitespace and comments, optimizing constant tokens, renaming local variables to shorter names etc.

The original author of LuaSrcDiet is Kein-Hong Man. He started the project in 2005, released new versions in 2008, 2011, and the last version in 2012. This tool is very effective in reducing size of Lua 5.1 source files (see some numbers in [4]), it can even reduce symbol entropy to improve compressibility of minified files. However, the last version from 2012 does not support Lua 5.2 and 5.3, i.e. it can’t process Lua 5.2+ sources, nor run on Lua 5.2+. Moreover there was no public upstream repository, only release tarballs in Google Code archive [5].

Kein-Hong Man told me that he don’t have time to maintain it, so I’m free to take it over. I gave it new home in https://github.com/jirutka/luasrcdiet, added compatibility for Lua 5.2 and 5.3, modernized and cleaned the code-base a bit, published it on LuaRocks, converted documentation comments to LDoc, converted wiki pages to AsciiDoc etc.

Contributions are welcome!

Jakub

[1]: https://luarocks.org/modules/jirutka/luasrcdiet
[2]: https://github.com/jirutka/luasrcdiet/releases
[3]: https://github.com/jirutka/luasrcdiet/blob/master/CHANGELOG.adoc
[4]: https://github.com/jirutka/luasrcdiet/blob/master/doc/performance-stats.adoc
[5]: https://code.google.com/archive/p/luasrcdiet/downloads



--
With best regards,
Kupriyanov Mikhail.