Re: [ruboto] Startup times in Emulator

42 views
Skip to first unread message

Uwe Kubosch

unread,
Feb 4, 2013, 11:43:54 AM2/4/13
to rub...@googlegroups.com
On 2013-02-04, at 12:27, Jeroen Bulters <jer...@bulte.rs> wrote:

> I've been trying to run some tests with Ruboto during the past week in order to determine if Ruboto is a feasible complement to our - currently in development - RubyMotion application. Unfortunately, even the default application takes about a minute and a half to start up on the emulator; making testing applications basically impossible (or at least extremely slow).
>
> Does any of you have experienced the same problem and - if so - what did you do to work around this (or even solve it).

I have a new Apple MacBook Pro and the startup benchmark for me on an Android 4.0.3 emulator is 22-23 seconds. Make sure to use an up to date Android SDK and emulator.

Startup time varies with Ruby 1.8 and 1.9 compatibility mode by around 50%. Ruby 1.8 compatibility mode is faster.

When doing development, I often use the "rake update_scripts:restart" command to push scripts to the device/emulator and restart the default activity. That should only take a couple of seconds.

When developing heavier apps, I use an actual device instead of the emulator. Startup time on my Samsung Galaxy S3 is about 5 seconds.

Scott is looking at speeding up startup time for the next release, and we will continue to improve it.


--
Uwe Kubosch
http://ruboto.org/



Robin2

unread,
Feb 4, 2013, 11:49:54 AM2/4/13
to rub...@googlegroups.com
Have you considered writing a short Ruboto app that will run scripts from the sdcard (like SL4A does). That way you could do the development without reloading the .apk every time you make a change to the code. Then when it works you could absorb it into Ruboto proper ???

...R

On Monday, February 4, 2013 11:27:09 AM UTC, Jeroen Bulters wrote:
I've been trying to run some tests with Ruboto during the past week in order to determine if Ruboto is a feasible complement to our - currently in development - RubyMotion application. Unfortunately, even the default application takes about a minute and a half to start up on the emulator; making testing applications basically impossible (or at least extremely slow).

Does any of you have experienced the same problem and - if so - what did you do to work around this (or even solve it). 

-- Jeroen Bulters

Uwe Kubosch

unread,
Feb 4, 2013, 11:54:27 AM2/4/13
to rub...@googlegroups.com
"rake update_scripts:restart" will push scripts to the internal storage if it is writable, ie. you use the emulator or have a rooted device. Other wise it will check for an sdcard and see if the app has access to external storage. If so, it will push the scripts to the sdcard where they will be loaded by the app. The same scripts will be packaged with your app the next time you build the package.
> --
> You received this message because you are subscribed to the Google Groups "Ruboto (JRuby on Android)" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ruboto+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Uwe Kubosch
u...@kubosch.no
http://kubosch.no/




Scott Moyer

unread,
Feb 4, 2013, 12:37:39 PM2/4/13
to rub...@googlegroups.com


On Feb 4, 2013 8:49 AM, "Robin2" <robin...@gmail.com> wrote:
>
> Have you considered writing a short Ruboto app that will run scripts from the sdcard (like SL4A does). That way you could do the development without reloading the .apk every time you make a change to the code. Then when it works you could absorb it into Ruboto proper ???
>

That is what IRB does. The trick then becomes where to edit scripts. Here are the options:

1) On the device (painful, but better with a bluetooth keyboard)

2) Push or pull them over to the device (adb, dropbox, etc.)

3) Use the demo-irb-server script to test out small sections of code, and to edit and run larger scripts.

I often find myself using AIDE to compile and run my ruboto app (synced through Dropbox) on the device. I then develop it in IRB and have a small script that copies the latest scripts to the AIDE project when I want to try the standalone version.

Robin2

unread,
Feb 4, 2013, 3:31:02 PM2/4/13
to rub...@googlegroups.com
Hi Uwe,

You will be aware of my aversion to rake so I have not tried this.

Just out of curiosity does this restart the Ruboto application or just re-run the script in an already started Ruboto app?

It's the latter I am suggesting - absolutely no startup delay unless of course the script causes a crash.

...R

Uwe Kubosch

unread,
Feb 5, 2013, 9:42:34 AM2/5/13
to rub...@googlegroups.com
On 2013-02-04, at 21:31, Robin2 <robin...@gmail.com> wrote:

> You will be aware of my aversion to rake so I have not tried this.

:) You can do the same operation manually.


> Just out of curiosity does this restart the Ruboto application or just re-run the script in an already started Ruboto app?

It reruns the script inside the running app.
Reply all
Reply to author
Forward
0 new messages