Hi,

We met an issue on android-1.5 platform, based on linux-2.6.28, pxa310
processor.

When we use for-loop(e.g. 1024 times) to call the funciton
setObjectFied() in android JNI repeatly, we find that it costs much
more time on pxa310 platform than other hardwate platform, such as G2
or OPhone.

the code:
     for(int i=0; i < len; i++ )
     {
         (env)->SetObjectField(thiz,ival,intarray);
     }

Here are the time they cost:
    pxa310:  call for 1024 times, cost about 3500ms
    OPhone: call for 1024 times, cost about 780ms
    G2:         call for 1024 times, cost less than 10ms

And it costs about 800~1000ms on emulator.

In addition, if we only call setObjectFiled( ) for only once or twice,
it costs nearly the same time about 10ms on the three hardware
platforms above.

And if we call setIntField() or setByteField() repeatly, the common
type instead of object type, it costs little time on pxa310 too.

We analyze that it may in connection with the hardware platform we
used. Our CPU has had a very high frequency 800MHZ than other
hardware, so we think that is it possible in connection with our
compiler? We have tried to use jdk1.5 and jdk1.6 to compile our test
apk, the result is the same. But the compiler we use to compile the
kernel and android system is android's default compiler: arm-
eabi-4.2.1 in android/prebuild/linux-x86/toolchain/, should we need to
do some porting job with the compiler according to the hardware
platform?

Or if it is caused by small memory, how should we configure the memory
settings to enlarge the memory for each process in dalvik?

Or caused by something else?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to