How to Speed Up a Capp App

69 views
Skip to first unread message

Keary Suska

unread,
Dec 16, 2016, 7:32:51 PM12/16/16
to objec...@googlegroups.com
I have finally loaded my beta app online and it is rather undesirably slow. I have compression turned on to speed up download but the response time for downloading resources in real-time is less than desirable. Will a jake release help? Or will I simply need to pre-load files and trust the browser cache?

TIA,

Keary Suska
Esoteritech, Inc.


Todd Freese

unread,
Dec 17, 2016, 12:24:30 PM12/17/16
to Cappuccino & Objective-J, cappu...@esoteritech.com
You should absolutely do a jake release. Even better jake deploy.

T

Prof. Michael Bach

unread,
Dec 18, 2016, 8:59:08 AM12/18/16
to objec...@googlegroups.com
> You should absolutely do a jake release. Even better jake deploy.

I beg to differ. I have found no appreciable speed difference after release, nor deploy.

In your case: have you set up you webserver to gzip everything? In my case that speeded up by a factor of 10. For Apache something like: AddOutputFilter DEFLATE sj j cib js css

Otherwise preloading assets might indeed help.


Best, Michael
--
Prof. Michael Bach PhD, Eye Center, University of Freiburg, Killianstr. 5, 79106 Freiburg, Germany.
Michae...@uni-freiburg.de <http://michaelbach.de>

Keary Suska

unread,
Dec 18, 2016, 10:32:36 AM12/18/16
to objec...@googlegroups.com

> On Dec 18, 2016, at 6:59 AM, Prof. Michael Bach <michae...@uni-freiburg.de> wrote:
>
>> You should absolutely do a jake release. Even better jake deploy.
>
> I beg to differ. I have found no appreciable speed difference after release, nor deploy.
>
> In your case: have you set up you webserver to gzip everything? In my case that speeded up by a factor of 10. For Apache something like: AddOutputFilter DEFLATE sj j cib js css
>
> Otherwise preloading assets might indeed help.

I haven’t tried jake deploy yet though I ask as I have heard the same thing about compiling. I am pretty sure the issue is simply the total initial download size (around 8mb according to Chrome). My hope was that the compiled loader would load less of the frameworks and that might help, as well as consolidating files as that would also reduce overall size. My stuff only clocks in just under 3mb, so the other 5mb is just framework stuff.

I do use real-time compression in my web server, FWIW, based on recommendations I have seen here. If there really isn’t any way to reduce the framework download size, there doesn’t seem to be much I can do with my own code.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

daboe01

unread,
Dec 18, 2016, 2:34:53 PM12/18/16
to Cappuccino & Objective-J
How many secs do you see?

Martin Carlberg

unread,
Dec 19, 2016, 8:08:15 AM12/19/16
to objec...@googlegroups.com
Hi!

The load time of a Cappuccino application is a complicated calculation. There are many factors and my view is to always measure it with the help of the developer tools in a browser. I usual work with Safari och Chrome as they have a wide range of features to help figure out what is going on when loading the application. Try different setups with ’jake deploy’ and ’jake release’ etc. Use the developer tools to find out what stages in the load that takes time.

Xib files can also make a big impact on load times. It is good to load large Xib files lazy when they are needed instead of at startup. A lot of efforts was spend to speed up Xib file loading late last year so make sure you use an up to date version of Cappuccino.

On our production server in our project we see a load time at around 3 second with browser caches turn off. That is measured from the start to when the first page is rendered in the browser. We only do ’jake release’ and not ’jake deploy’ when installing.

Some good information about profiling application load times:
https://developer.apple.com/library/content/documentation/AppleApplications/Conceptual/Safari_Developer_Guide/Instruments/Instruments.html
https://developers.google.com/web/tools/chrome-devtools/network-performance/resource-loading


Happy coding,

- Martin
> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
> To post to this group, send email to objec...@googlegroups.com.
> Visit this group at https://groups.google.com/group/objectivej.
> For more options, visit https://groups.google.com/d/optout.

daboe01

unread,
Dec 19, 2016, 10:12:43 AM12/19/16
to Cappuccino & Objective-J
on chrome and safari i also see roughly 3-4 seconds until the first data come up. With FF it is 6 secs. All this is from source but with gz compression turned on, inside a high speed intranet with the cache turned off server side.
best greetings,
daniel 

Keary Suska

unread,
Dec 19, 2016, 1:38:55 PM12/19/16
to objec...@googlegroups.com

> On Dec 18, 2016, at 12:34 PM, 'daboe01' via Cappuccino & Objective-J <objec...@googlegroups.com> wrote:
>
> How many secs do you see?

On my speedy, top-of-the-line iMac I get more appreciable performance on load. Chrome shows 7.5ms spent loading, and 2547.4ms “scripting” (and 282ms in “other”, but I don’t know what that is). This was much slower than I was previously experiencing (at least twice that), though some of that might have to do with using a slower MacBook and not having as good an Internet connection.

These are “unjaked” numbers, so it might indicate that jake-ing the project might give some improvements in the “scripting” area (which I assume means time spent interpreting/executing).

I will also play with some bandwidth throttling to compare.

daboe01

unread,
Dec 20, 2016, 2:20:37 AM12/20/16
to Cappuccino & Objective-J, cappu...@esoteritech.com
i do not see any benefits from "jaking" when using chrome/safari and gz compression.

Martin Carlberg

unread,
Dec 21, 2016, 8:44:18 AM12/21/16
to objec...@googlegroups.com
Just for the record. I do believe that at least ’jake release’ should be used to get best loading speed. ’jake’ deploy’ might give better or worse performance but it should be measured before decided. It is good, as said here, to make sure the files a compressed when the webserver delivers the files.

’jake release’ compiles the objective-j files to Javascript and puts them in one file. Different frameworks will be in there own file. ’jake deploy’ will merge all files into one big Javascript file and try to remove unused things. I don’t know how good it is to remove unused stuff but I usually don’t see anything removed.

I think that when computers and the internet where slower it was good to have only one big file. Now it looks like it is be better to have some files to load. When the first is loaded it can start to execute the Javascript before the next file is loaded and so on. The Objective-J load system is very asynchronous and well written for this.

- Martin

Reply all
Reply to author
Forward
0 new messages