Hints for minimal deployment

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

Hints for minimal deployment

NorbertHartl
After working a few days on a new client using amber I tried to run it on a google nexus 7 tablet. It took more than 5 seconds for the page to appear. The culprit was easy to find. Loading the IDE involves loading bigger files and the dynamic loader issues quite a number of requests for js files. Switching to deploy mode in the loader still needs nearly 3 seconds to appear.
Is there any documentation already how to shrink wrap an application to load faster? Or is there something in the toolchain to combine necessary js files into one? I see jquery-ui and lot of stuff being loaded that is surely not needed if you deploy your own app.

I'm just asking before I start to build my own counter measures.

thanks,

Norbert


Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Nicolas Petton

Hi Norbert,

When I need speed at load time, I usually make sure that I only load
required files (Kernel-* + my own packages). I don't load the IDE, the
compiler, etc.

Also I load *.deploy.js files.

You can combine the files into one, putting them in dependency order
into a .js file, with something like the following (untested):

cat boot.js Kernel-Classes.deploy.js Kernel-Objects.deploy.js
Kernel-Collections.deploy.js MyPackage.deploy.js init.js > myapp.js

then loading jQuery + myapp.js is all I need to run the app.


HTH,
Nico

Norbert Hartl <[hidden email]> writes:

> After working a few days on a new client using amber I tried to run it on a google nexus 7 tablet. It took more than 5 seconds for the page to appear. The culprit was easy to find. Loading the IDE involves loading bigger files and the dynamic loader issues quite a number of requests for js files. Switching to deploy mode in the loader still needs nearly 3 seconds to appear.
> Is there any documentation already how to shrink wrap an application to load faster? Or is there something in the toolchain to combine necessary js files into one? I see jquery-ui and lot of stuff being loaded that is surely not needed if you deploy your own app.
>
> I'm just asking before I start to build my own counter measures.
>
> thanks,
>
> Norbert
>
>

--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Nicolas Petton
In reply to this post by NorbertHartl

Norbert Hartl <[hidden email]> writes:


> I'm just asking before I start to build my own counter measures.

If you need it and do so, would you mind sharing your "counter
measures" with us?

Thanks,
Nico
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

NorbertHartl

Am 17.12.2012 um 15:37 schrieb Nicolas Petton <[hidden email]>:

>
> Norbert Hartl <[hidden email]> writes:
>
>
>> I'm just asking before I start to build my own counter measures.
>
> If you need it and do so, would you mind sharing your "counter
> measures" with us?
>
Sure. At the moment I just hack together some prototype. But I can imagine that I could need something like that very soon. Did you ever try to minify and/or using google closure compiler with amber?

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Nicolas Petton
As far as I remember, Göran did.

Göran? :)

Norbert Hartl <[hidden email]> writes:

> Am 17.12.2012 um 15:37 schrieb Nicolas Petton <[hidden email]>:
>
>>
>> Norbert Hartl <[hidden email]> writes:
>>
>>
>>> I'm just asking before I start to build my own counter measures.
>>
>> If you need it and do so, would you mind sharing your "counter
>> measures" with us?
>>
> Sure. At the moment I just hack together some prototype. But I can imagine that I could need something like that very soon. Did you ever try to minify and/or using google closure compiler with amber?
>
> Norbert
>

--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Esteban A. Maringolo
In reply to this post by NorbertHartl
Norbert,

Is it I/O time (file/network) or CPU time?

Regards!
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Manfred Kröhnert
In reply to this post by Nicolas Petton

There is a flag for amberc (-o) to invoke the closure compiler.
But there is a bug entry on GitHub regarding it.
Also, the compiler must be installed in a specific location if I remember correctly.

Best,
Manfred

Am 17.12.2012 16:03 schrieb "Nicolas Petton" <[hidden email]>:
As far as I remember, Göran did.

Göran? :)

Norbert Hartl <[hidden email]> writes:

> Am 17.12.2012 um 15:37 schrieb Nicolas Petton <[hidden email]>:
>
>>
>> Norbert Hartl <[hidden email]> writes:
>>
>>
>>> I'm just asking before I start to build my own counter measures.
>>
>> If you need it and do so, would you mind sharing your "counter
>> measures" with us?
>>
> Sure. At the moment I just hack together some prototype. But I can imagine that I could need something like that very soon. Did you ever try to minify and/or using google closure compiler with amber?
>
> Norbert
>

--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

NorbertHartl
In reply to this post by Esteban A. Maringolo

Am 17.12.2012 um 16:20 schrieb Esteban A. Maringolo <[hidden email]>:

> Norbert,
>
> Is it I/O time (file/network) or CPU time?
>
I don't know. I didn't dig into it. I need to figure out first what is a good way to get such information from an android device.

Norbert

Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Dave Mason-2
In reply to this post by Nicolas Petton

On 2012-Dec-17, at 9:36 , Nicolas Petton wrote:

> When I need speed at load time, I usually make sure that I only load
> required files (Kernel-* + my own packages). I don't load the IDE, the
> compiler, etc.
>
> Also I load *.deploy.js files.


Also I had added a field for canvasDeply to the amber.load spec because Canvas.deploy and jQuery.min are almost another 140K of load, but it seems not to be in the current github version.

This may not make enough difference to matter.

../Dave
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Esteban A. Maringolo
In reply to this post by NorbertHartl
Have you tried Weinre? (http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html)
I played around with it (for a mobile web, not a PhoneGap app) and it's pretty slick.

There is a PhoneGap server for it: http://debug.phonegap.com/

Regards!
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

gokr
In reply to this post by Manfred Kröhnert
Hi!

On 12/17/2012 04:42 PM, Manfred Kröhnert wrote:
> There is a flag for amberc (-o) to invoke the closure compiler.
> But there is a bug entry on GitHub regarding it.
> Also, the compiler must be installed in a specific location if I
> remember correctly.

Yeah, well, I added that and yes, feel free to fix that little "place
the jar file here" thing :)

IIRC it works fine but if you want to use "advanced" level (it does dead
code elimination and more agressive renaming etc) then there are (or
were at least) things in the js code that needed our attention for it to
work.

regards, Göran
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Marten Feldtmann-2
In reply to this post by NorbertHartl
Are you sure, that this is only the transfer time for the files ?
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Manfred Kröhnert
In reply to this post by gokr
Hi,

On Tuesday, December 18, 2012 10:23:55 PM UTC+1, Göran Krampe wrote:
Hi!

On 12/17/2012 04:42 PM, Manfred Kr�hnert wrote:
> There is a flag for amberc (-o) to invoke the closure compiler.
> But there is a bug entry on GitHub regarding it.
> Also, the compiler must be installed in a specific location if I
> remember correctly.

Yeah, well, I added that and yes, feel free to fix that little "place
the jar file here" thing :)

IIRC it works fine but if you want to use "advanced" level (it does dead
code elimination and more agressive renaming etc) then there are (or
were at least) things in the js code that needed our attention for it to
work.

regards, G�ran


while working on the NodeJS based Amber compiler I also tried using all Closure compiler flags.
There was only one minor error (pull request with a fix from herby is pending).
Even advanced optimizations worked without problems afterwards.

Best,
Manfred
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Nicolas Petton

Very nice to know. It's been a long time since I tried it. I'll merge
and see if it works.

Nico

MKroehnert <[hidden email]> writes:

> Hi,
>
> On Tuesday, December 18, 2012 10:23:55 PM UTC+1, Göran Krampe wrote:
>>
>> Hi!
>>
>> On 12/17/2012 04:42 PM, Manfred Kr�hnert wrote:
>> > There is a flag for amberc (-o) to invoke the closure compiler.
>> > But there is a bug entry on GitHub regarding it.
>> > Also, the compiler must be installed in a specific location if I
>> > remember correctly.
>>
>> Yeah, well, I added that and yes, feel free to fix that little "place
>> the jar file here" thing :)
>>
>> IIRC it works fine but if you want to use "advanced" level (it does dead
>> code elimination and more agressive renaming etc) then there are (or
>> were at least) things in the js code that needed our attention for it to
>> work.
>>
>> regards, G�ran
>>
>
>
> while working on the NodeJS based Amber compiler I also tried using all
> Closure compiler flags.
> There was only one minor error (pull request with a fix from herby
> is pending).
> Even advanced optimizations worked without problems afterwards.
>
> Best,
> Manfred

--
Nicolas Petton
http://nicolas-petton.fr
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

sebastianconcept
guys is amberc working for you in the current master? 84452849521436b725d685153024266cd773d316

because doens't seem to compile anything.

It's just instantly saying:
"Closure compiler found at: /Users/sebastian/compiler.jar"
 
and no file got done

I'm missing something?





On Monday, January 7, 2013 11:25:54 AM UTC-2, nicolas petton wrote:

Very nice to know. It's been a long time since I tried it. I'll merge
and see if it works.

Nico

MKroehnert <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="aEzUnDQViNcJ">mkroeh...@...> writes:

> Hi,
>
> On Tuesday, December 18, 2012 10:23:55 PM UTC+1, Göran Krampe wrote:
>>
>> Hi!
>>
>> On 12/17/2012 04:42 PM, Manfred Kr�hnert wrote:
>> > There is a flag for amberc (-o) to invoke the closure compiler.
>> > But there is a bug entry on GitHub regarding it.
>> > Also, the compiler must be installed in a specific location if I
>> > remember correctly.
>>
>> Yeah, well, I added that and yes, feel free to fix that little "place
>> the jar file here" thing :)
>>
>> IIRC it works fine but if you want to use "advanced" level (it does dead
>> code elimination and more agressive renaming etc) then there are (or
>> were at least) things in the js code that needed our attention for it to
>> work.
>>
>> regards, G�ran
>>
>
>
> while working on the NodeJS based Amber compiler I also tried using all
> Closure compiler flags.
> There was only one minor error (pull request with a fix from herby
> is pending).
> Even advanced optimizations worked without problems afterwards.
>
> Best,
> Manfred

--
Nicolas Petton
http://nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Nicolas Petton
Manfred, any idea?

Nico


On Apr 14, 2013, at 12:45 AM, Sebastian Sastre <[hidden email]> wrote:

guys is amberc working for you in the current master? 84452849521436b725d685153024266cd773d316

because doens't seem to compile anything.

It's just instantly saying:
"Closure compiler found at: /Users/sebastian/compiler.jar"
 
and no file got done

I'm missing something?





On Monday, January 7, 2013 11:25:54 AM UTC-2, nicolas petton wrote:

Very nice to know. It's been a long time since I tried it. I'll merge
and see if it works.

Nico

MKroehnert <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="aEzUnDQViNcJ">mkroeh...@...> writes:

> Hi,
>
> On Tuesday, December 18, 2012 10:23:55 PM UTC+1, Göran Krampe wrote:
>>
>> Hi!
>>
>> On 12/17/2012 04:42 PM, Manfred Kr�hnert wrote:
>> > There is a flag for amberc (-o) to invoke the closure compiler.
>> > But there is a bug entry on GitHub regarding it.
>> > Also, the compiler must be installed in a specific location if I
>> > remember correctly.
>>
>> Yeah, well, I added that and yes, feel free to fix that little "place
>> the jar file here" thing :)
>>
>> IIRC it works fine but if you want to use "advanced" level (it does dead
>> code elimination and more agressive renaming etc) then there are (or
>> were at least) things in the js code that needed our attention for it to
>> work.
>>
>> regards, G�ran
>>
>
>
> while working on the NodeJS based Amber compiler I also tried using all
> Closure compiler flags.
> There was only one minor error (pull request with a fix from herby
> is pending).
> Even advanced optimizations worked without problems afterwards.
>
> Best,
> Manfred

--
Nicolas Petton
http://nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Hints for minimal deployment

Manfred Kröhnert

Hi Nico,

We tried to solve the problem yesterday on IRC and will continue until we solved it.

Best,
Manfred

Am 15.04.2013 18:27 schrieb "Nicolas Petton" <[hidden email]>:
Manfred, any idea?

Nico


On Apr 14, 2013, at 12:45 AM, Sebastian Sastre <[hidden email]> wrote:

guys is amberc working for you in the current master? 84452849521436b725d685153024266cd773d316

because doens't seem to compile anything.

It's just instantly saying:
"Closure compiler found at: /Users/sebastian/compiler.jar"
 
and no file got done

I'm missing something?





On Monday, January 7, 2013 11:25:54 AM UTC-2, nicolas petton wrote:

Very nice to know. It's been a long time since I tried it. I'll merge
and see if it works.

Nico

MKroehnert <[hidden email]> writes:

> Hi,
>
> On Tuesday, December 18, 2012 10:23:55 PM UTC+1, Göran Krampe wrote:
>>
>> Hi!
>>
>> On 12/17/2012 04:42 PM, Manfred Kr�hnert wrote:
>> > There is a flag for amberc (-o) to invoke the closure compiler.
>> > But there is a bug entry on GitHub regarding it.
>> > Also, the compiler must be installed in a specific location if I
>> > remember correctly.
>>
>> Yeah, well, I added that and yes, feel free to fix that little "place
>> the jar file here" thing :)
>>
>> IIRC it works fine but if you want to use "advanced" level (it does dead
>> code elimination and more agressive renaming etc) then there are (or
>> were at least) things in the js code that needed our attention for it to
>> work.
>>
>> regards, G�ran
>>
>
>
> while working on the NodeJS based Amber compiler I also tried using all
> Closure compiler flags.
> There was only one minor error (pull request with a fix from herby
> is pending).
> Even advanced optimizations worked without problems afterwards.
>
> Best,
> Manfred

--
Nicolas Petton
http://nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.