About Monkey 2 › Forums › Monkey 2 Development › App Sizes – getting bigger and bigger
This topic contains 5 replies, has 3 voices, and was last updated by
nerobot 2 years, 3 months ago.
-
AuthorPosts
-
January 3, 2017 at 8:41 am #6161
I’ve been watching the created app sizes between monkey2 versions.
Simple app linking mojo and std
V1.02 general debug app size = 10mb
V1.09 general debug app size = 12mb
when compiling release remove approximately 4mb
So V1.02 final release size = 5.5mb
V1.09 final release size = 7.5mb
Question.
Why are the app sizes this big? (I think sdl compile is about 1.5mb in total? Why with each release are the file size going up at this level. a few k or so I can understand, but not mb!
Blitzmax is a very svelt language in it’s final app sizes, why are monkey2 files this big?
Also, why are font being copied along with themes, etc when they are NOT used, same with the shaders. it feels there is some love needed with the final gathering of files?
January 4, 2017 at 1:34 pm #6209+1.
Also I’m intresting in – is there way to reduce .so lib size.
January 5, 2017 at 12:04 pm #6227As far as the Standard Module goes for Monkey it’s nicely structured for aggregation in terms of the directory structure… So in other words you could create a std-collections.monkey2 document in the “monkey2/modules/std/” directory and have it contain only the import directives to all files in “std/collections/”
std-collections.monkey2
Monkey12345#Import "collections/container"#Import "collections/stack"#Import "collections/list"#Import "collections/map"#Import "collections/deque"You can do this with almost any module, to ultimately reduce the final compile size. Just rebuild the modules after your edits and then make a test to see if it works then act accordingly. This is what I’m doing right now and I’m getting nearly half the compile sizes compared to the default implementation of std and other modules. Hopefully this will become the norm. I hope this helped out.
January 5, 2017 at 4:47 pm #6230Hm, interesting. This is a good news.:) Especially if Mark do it the same way.
I tried to use ‘using std.collections’ but this had no result for sizing.
Then I tried to import ‘sub’-module like #import <std.collections> but this is incorrect / unsupported way.
Then I tried to import by absolute path (%path_to_modules%/std/collections.monkey2) – just for test, but absolute path didn’t work that time.
And I postponed my attempt until better times.
January 6, 2017 at 10:14 am #6240I should’ve noted that this requires you to make a new module for each std-*.monkey2. while containing the source for each. My bad. Just make a new folders in the module directory containing the std-*monkey files along with a filledout module.json file and it should work when you import it on it’s own after a rebuild. Sorry for the missing info. xD
Eample:
modules/
– std-colections/
– – collections/
– – std-collections.monkey2
– – module.json
– std-graphics/
– – graphics/
– – std-grahics.monkey2
– – module.json
– std-filesystem/
– – filesystem/
– – std-filesystem.monkey2
– – module.jsonJanuary 6, 2017 at 10:32 am #6241I understood you, but I don’t want to rearrange modules (don’t have any releasable project in dev).
I hope that Mark do it himself sometime.
-
AuthorPosts
You must be logged in to reply to this topic.