Greetings,
I'm currently working on some Android app and I'm considering to use db4o as storage for some objects, with little success. As it seems to work perfectly on a normal machine, it seems to be somewhat limited on Android. My class structure is pretty easy - it's one class with about 10 properties and 4 ArrayLists of 4 other classes (which don't use any complex types). Storing one instance of my class does work on my Mac and within the Android Emulator, but retrieving the object fails with a huge stackoverflow error in the emulator, though it does work on the Mac.
I even reduced the complexity, that didn't change anything.
Are there any performance figures for db4o on Android? I'm currently writing serialized files, which is pretty slow on Android
- Read / Write Serialized object on PC: 32ms / 15ms
- Read / Write object with db4o: 85ms / 64ms
- Read / Write serialized object on android: 450ms / 600ms
- Write object with db4o: 900ms (couldn't test read)
even though it's somewhat slower with db4o, there could be some advantages for me. is there any chance, that it's faster if the objects are not serialized ?
regards,
Martin
Hi,
I experienced StackOverflow errors on Android with db4o, too, and I nailed it down to native queries mostly. I can use SODA or QBE on Android just fine. My naive assumption is that native queries need a larger stack due to them being optimized and translated into SODA, at least according to the documentation. Maybe it helps to disable optimization on native queries. Unfortunately Android has a very small default stack size and you cant really change it.
One way to work around it is to create a new thread with an explicit stack size and execute such tasks there, but of course thats not so pretty if you need to do that for every query.
Personally I would not go as far as blaming db4o for the stack overflows even though it would of course be nice if they would not appear ;-)
Regards
Roman
thanks a lot for the hint. I'm using SODA queries now, those work like a charm!
best regards,
thanks for the sharing!
___________
[url=http://www.laptopcomputers.co.nz/]laptops computers[/url] [url=http://www.laptopcomputers.co.nz/]dell nz[/url] [url=http://www.laptopcomputers.co.nz/]dell computers[/url]