Unable to load 7MB yaml file on ruboto
--------------------------------------

                 Key: JRUBY-5586
                 URL: http://jira.codehaus.org/browse/JRUBY-5586
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6RC3
         Environment: ruboto-core master 2011-03-14
jruby-jars 1.6 master 2011-03-14

            Reporter: Uwe Kubosch
             Fix For: JRuby 1.6.1
         Attachments: message.gz

This is probably a first :)

We are porting an application from java on linux to dalvik on android.

We need to decode a 7MB yaml encoded message on an android 3.0 tablet.

We are targeting a tablet like the XOOM with dual core 1GHz cpu, 1GB RAM, and 
1GB persistent storage.  This hardware should easily be able to decode the 
message.

We do not have the actual device, so we are testing on the Android Emulator 
with a 3.0 target.

I have attached an example of a message.  It is compressed, and can be 
uncompressed with:

{noformat}
require 'zlib'
deflated_message = File.read("message.gz")
inflated_message = Zlib::Inflate.inflate(deflated_message)
{noformat}

This works great!

To load the resulting yaml, we call:

{noformat}
require 'yaml'
message = YAML.load(inflated_message)
{noformat}

This call never finishes when we call it on the emulator.

We have increased the "Device ram size" to 1024, and the "Max VM application 
heap size" to 512, and we see heap increases to about 100MB, but no more.  We 
start the emulator with -partition-size 1024 so we have enough disk space 
available.

It would be great to solve this, since it is the only known obstacle for our 
port.

On a MacBook Pro with Apple Java, decoding finishes in 7 seconds including vm 
and jruby startup:

{noformat}
uwe$ time jruby -ryaml -rzlib -e "d = File.read('message.gz'); i = 
Zlib::Inflate.inflate(d) ; m = YAML.load(i)"

real    0m6.249s
user    0m6.921s
sys     0m0.409s
uwe$

As always, we are very grateful for any input on the problem.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to