Small Seaside image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Small Seaside image

laurent laffont
Hi,

actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it possible to have it smaller ? (I know a next step is to be able to use PharoKernel).

Laurent Laffont - @lolgzs
Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Marcus Denker-4

On Aug 3, 2011, at 10:17 AM, laurent laffont wrote:

> Hi,
>
> actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it possible to have it smaller ? (I know a next step is to be able to use PharoKernel).

cleanUpForProduction should result in a Core image that is just 6.5MB... so the ConfigurationOfSeaside30 seems to load *a lot* of stuff? Maybe be a bit selective?

        Marcus


--
Marcus Denker -- http://marcusdenker.de


Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Mariano Martinez Peck
Hi Laurent. First, as Marcus said, there is no magic. You should really load the packages of seaside and all the minimal dependes. Just load what you need. Once you are done, evaluate ScriptLoader new cleanUpForRelease. But take a look to what that method does.
Then, if you are sure you don't need certain packages from pharo core, thanks to the better modularization we have, you can remove it.  Esteban did that for his images for iPhone.

There are also some shrink you can do. For example,
"To put all all classes with the default category. Still can browse and recompile the whole image.
Most production enviroments don't care about categories...this make sense when developing."

Smalltalk allClassesAndTraitsDo: [:each | each zapOrganization ].

how much did it help?

Fonts. Do you need al fonts? no...remove them.

etc...


On Wed, Aug 3, 2011 at 10:24 AM, Marcus Denker <[hidden email]> wrote:

On Aug 3, 2011, at 10:17 AM, laurent laffont wrote:

> Hi,
>
> actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it possible to have it smaller ? (I know a next step is to be able to use PharoKernel).

cleanUpForProduction should result in a Core image that is just 6.5MB... so the ConfigurationOfSeaside30 seems to load *a lot* of stuff? Maybe be a bit selective?

       Marcus


--
Marcus Denker -- http://marcusdenker.de





--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Philippe Marschall-2
In reply to this post by laurent laffont
On 08/03/2011 10:16 AM, laurent laffont wrote:
> Hi,
>
> actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, …

Depending on what you do this can load a lot. Even things that you may
not need like:
 - Tests
 - JQuery _and_ Scriptaculous
 - OB
 - RSS
 - …

Cheers
Philippe



Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Benjamin Van Ryseghem (Pharo)
In reply to this post by laurent laffont
If you want, you can play with Hazelnut :)


Ben

On Aug 3, 2011, at 10:16 AM, laurent laffont wrote:

Hi,

actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it possible to have it smaller ? (I know a next step is to be able to use PharoKernel).

Laurent Laffont - @lolgzs

Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Hilaire Fernandes
I have found a difference of about 5Mb whether I install or not some
DejaVu fonts:

-----------------------
Gofer new
   url: 'http://www.squeaksource.com/DejaVu';
   package: 'DejaVuBitmapFonts';
   load.

ScriptLoader new cleanUpForProduction.

DejaVuHolder installSizes: #(10 12).
StandardFonts setDefaultFonts: #(
   (codeFont: 'Bitmap DejaVu Sans Regular' 12)
   (listFont: 'Bitmap DejaVu Sans Regular' 12)
   (menuFont: 'Bitmap DejaVu Sans Regular' 12)
   (windowTitleFont: 'Bitmap DejaVu Sans Regular' 12)
   (balloonFont: 'Bitmap DejaVu Sans Regular' 10)
   (haloFont: 'Bitmap DejaVu Sans Regular' 10)
   (buttonFont: 'Bitmap DejaVu Sans Regular' 12)
   (defaultFont: 'Bitmap DejaVu Sans Regular' 12)).
-----------------------

5Mb seems a lot for two sizes font, even if it comes with Bitmaps. Is it
correct or are there some clean up I can do in the fonts?

Hilaire


Le 03/08/2011 12:13, Benjamin a écrit :

> If you want, you can play with Hazelnut :)
>
>
> Ben
>
> On Aug 3, 2011, at 10:16 AM, laurent laffont wrote:
>
>> Hi,
>>
>> actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core,
>> then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it
>> possible to have it smaller ? (I know a next step is to be able to use
>> PharoKernel).
>>
>> Laurent Laffont - @lolgzs <http://twitter.com/#!/lolgzs>
>>
>> Pharo Smalltalk Screencasts: http://www.pharocasts.com/
>> Blog: http://magaloma.blogspot.com/
>> Developer group: http://cara74.seasidehosting.st
>> <http://cara74.seasidehosting.st/>
>>
>


--
Education 0.2 -- http://blog.ofset.org/hilaire


Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Henrik Sperre Johansen

On Aug 3, 2011, at 1:16 07PM, Hilaire Fernandes wrote:

I have found a difference of about 5Mb whether I install or not some
DejaVu fonts:

-----------------------
Gofer new
  url: 'http://www.squeaksource.com/DejaVu';
  package: 'DejaVuBitmapFonts';
  load.

ScriptLoader new cleanUpForProduction.

DejaVuHolder installSizes: #(10 12).
StandardFonts setDefaultFonts: #(
  (codeFont: 'Bitmap DejaVu Sans Regular' 12)
  (listFont: 'Bitmap DejaVu Sans Regular' 12)
  (menuFont: 'Bitmap DejaVu Sans Regular' 12)
  (windowTitleFont: 'Bitmap DejaVu Sans Regular' 12)
  (balloonFont: 'Bitmap DejaVu Sans Regular' 10)
  (haloFont: 'Bitmap DejaVu Sans Regular' 10)
  (buttonFont: 'Bitmap DejaVu Sans Regular' 12)
  (defaultFont: 'Bitmap DejaVu Sans Regular' 12)).
-----------------------

5Mb seems a lot for two sizes font, even if it comes with Bitmaps. Is it
correct or are there some clean up I can do in the fonts?

Hilaire

The package holds source bitmaps for ALL sizes.
Cean up after you have installed the ones you want by unloading DejaVuBitmapFonts again.

You can also save more space by removing StrikeFont dejaVuSans... methods, which are sources for the 3 already installed sizes.
This should probably be the job of a #cleanup: true method on StrikeFont though. (which is called by cleanupForProduction)

Cheers,
Henry
Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Hilaire Fernandes
Le 03/08/2011 13:45, Henrik Johansen a écrit :

>
> On Aug 3, 2011, at 1:16 07PM, Hilaire Fernandes wrote:
>
>> I have found a difference of about 5Mb whether I install or not some
>> DejaVu fonts:
>>
>> -----------------------
>> Gofer new
>>   url: 'http://www.squeaksource.com/DejaVu';
>>   package: 'DejaVuBitmapFonts';
>>   load.
>>
>> ScriptLoader new cleanUpForProduction.
>>
>> DejaVuHolder installSizes: #(10 12).
>> StandardFonts setDefaultFonts: #(
>>   (codeFont: 'Bitmap DejaVu Sans Regular' 12)
>>   (listFont: 'Bitmap DejaVu Sans Regular' 12)
>>   (menuFont: 'Bitmap DejaVu Sans Regular' 12)
>>   (windowTitleFont: 'Bitmap DejaVu Sans Regular' 12)
>>   (balloonFont: 'Bitmap DejaVu Sans Regular' 10)
>>   (haloFont: 'Bitmap DejaVu Sans Regular' 10)
>>   (buttonFont: 'Bitmap DejaVu Sans Regular' 12)
>>   (defaultFont: 'Bitmap DejaVu Sans Regular' 12)).
>> -----------------------
>>
>> 5Mb seems a lot for two sizes font, even if it comes with Bitmaps. Is it
>> correct or are there some clean up I can do in the fonts?
>>
>> Hilaire
>>
> The package holds source bitmaps for ALL sizes.
> Cean up after you have installed the ones you want by unloading
> DejaVuBitmapFonts again.

Ah, yes understood how it works.

>
> You can also save more space by removing StrikeFont dejaVuSans...

Is it "StrikeFont cleanUp" enought?
It saves about 4 MB, with a final image below 10MB, nice.

Thanks

Hilaire


Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

Henrik Sperre Johansen

On Aug 3, 2011, at 2:36 17PM, Hilaire Fernandes wrote:

Le 03/08/2011 13:45, Henrik Johansen a écrit :

On Aug 3, 2011, at 1:16 07PM, Hilaire Fernandes wrote:

I have found a difference of about 5Mb whether I install or not some
DejaVu fonts:

-----------------------
Gofer new
 url: 'http://www.squeaksource.com/DejaVu';
 package: 'DejaVuBitmapFonts';
 load.

ScriptLoader new cleanUpForProduction.

DejaVuHolder installSizes: #(10 12).
StandardFonts setDefaultFonts: #(
 (codeFont: 'Bitmap DejaVu Sans Regular' 12)
 (listFont: 'Bitmap DejaVu Sans Regular' 12)
 (menuFont: 'Bitmap DejaVu Sans Regular' 12)
 (windowTitleFont: 'Bitmap DejaVu Sans Regular' 12)
 (balloonFont: 'Bitmap DejaVu Sans Regular' 10)
 (haloFont: 'Bitmap DejaVu Sans Regular' 10)
 (buttonFont: 'Bitmap DejaVu Sans Regular' 12)
 (defaultFont: 'Bitmap DejaVu Sans Regular' 12)).
-----------------------

5Mb seems a lot for two sizes font, even if it comes with Bitmaps. Is it
correct or are there some clean up I can do in the fonts?

Hilaire

The package holds source bitmaps for ALL sizes.
Cean up after you have installed the ones you want by unloading
DejaVuBitmapFonts again.

Ah, yes understood how it works.


You can also save more space by removing StrikeFont dejaVuSans...

Is it "StrikeFont cleanUp" enought?
It saves about 4 MB, with a final image below 10MB, nice.

Thanks

Hilaire

StrikeFont cleanUp is called anyways as part of cleanUpForProduction.
Doing the removal only shaved off 900KB or so in my test though, see http://code.google.com/p/pharo/issues/detail?id=4597

Cheers,
Henry

Reply | Threaded
Open this post in threaded view
|

Re: Small Seaside image

laurent laffont
In reply to this post by Mariano Martinez Peck
Thanks for your help all.

My steps:
- Seaside/Magritte: load only what's needed for SmallHarbour
- load Zinc-Seaside instead of Comanche
- cleanUpForProduction
- zapOrganization

I now have a 10MB image.

Laurent.

On Wed, Aug 3, 2011 at 10:38 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi Laurent. First, as Marcus said, there is no magic. You should really load the packages of seaside and all the minimal dependes. Just load what you need. Once you are done, evaluate ScriptLoader new cleanUpForRelease. But take a look to what that method does.
Then, if you are sure you don't need certain packages from pharo core, thanks to the better modularization we have, you can remove it.  Esteban did that for his images for iPhone.

There are also some shrink you can do. For example,
"To put all all classes with the default category. Still can browse and recompile the whole image.
Most production enviroments don't care about categories...this make sense when developing."

Smalltalk allClassesAndTraitsDo: [:each | each zapOrganization ].

how much did it help?

Fonts. Do you need al fonts? no...remove them.

etc...



On Wed, Aug 3, 2011 at 10:24 AM, Marcus Denker <[hidden email]> wrote:

On Aug 3, 2011, at 10:17 AM, laurent laffont wrote:

> Hi,
>
> actually using PharoCore 1.3, loading ConfigurationOfSeaside30 Core, then ScriptLoader>>cleanUpForProduction I have a 13MB image. Is it possible to have it smaller ? (I know a next step is to be able to use PharoKernel).

cleanUpForProduction should result in a Core image that is just 6.5MB... so the ConfigurationOfSeaside30 seems to load *a lot* of stuff? Maybe be a bit selective?

       Marcus


--
Marcus Denker -- http://marcusdenker.de





--
Mariano
http://marianopeck.wordpress.com