Modularity

On 2016-03-14 21:36, RM wrote:
> Recently "elsewhere" a chap working with Livecode was complaining
> about the 'bloat'
> in a standalone between the 6 series and the 7 series (he's going to
> go seriously sour when he sees 8)
> because he is trying to squeeze standalones onto Android devices with
> limited storage.
Some empirical data - for a blank stack saved for Android, the size of
the APK in each is:
LiveCode 6.7 - 2.4Mb
LiveCode 7.1 - 6Mb
LiveCode 8.0 - 6.3Mb
What people see as 'bloat' between 6.7 and 7.1 is nothing more than the
Unicode data tables which are essential if you actually want text to be
processed correctly and efficiently - the actual code size of the engine
has not changed much.
The difference between 7.1 and 8.0 is most likely due to the increased
internal symbol table that 8.0 needs to have at present to support LCB
*modules* - if you want modularity then you need to store the
information to bind the modules together and this does take a little
space at present. (Although we do have a plan to do the matching up at
standalone build time at some point - which would eliminate the need for
the extra symbol tables - assuming the standalone does not want to load
modules dynamically).
> So; what chance "modularity" (if that's what the thing is callled) in
> the foreseeable future?
Well, the refactoring was the start to getting to 'modularity' -
previously the code for any piece of syntax was grouped under the first
word of the piece of syntax even if they covered completely different
areas, now code is grouped by what it does and is separate from the code
which parses and dispatches actions. There's still more work to do to
modularise the existing engine feature set, but the critical part (the
refactoring) has been done.
Apart from that, LCB modules are the mechanism by which such modularity
will occur - for example, right now, if you don't ask to have the
browser widget included then you don't pay the cost for CEF being put
into your standalone on Desktop. (I should point out that, even if the
code is still implemented in C++, LCB will be the formalism by which
syntax is defined - when we get Open Language - and bound to the C++
methods implementing it, regardless of whether there is actually any LCB
code needed).
It is worth point out, however, that the largest code carrying parts of
the engine are already optional - that would be things like revXml,
revDB and drivers, revBrowser etc. They are only included if you ask and
they can be weighty because they include third-party libraries which are
not necessarily modular and small in and of themselves.
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps