When using Protocol Buffers with Android (running in the Windows VM)
I'm noticing that the first time I instantiate a protocol buffer based
class Android lags for some time.  When I step through it looks like
it's spending a lot of time dynamically loading the protocol buffer
classes.  Is there something I can do to speed up this process?  I
haven't tested yet on a physical device, so the delay might not be as
bad but in the VM it takes about 30 - 45 seconds to load all the
classes and get past that first message instantiation.

What I did was downloaded the Protocol Buffers source code.  Compiled
the .java files.  Stuffed them into a .jar.  Added the .jar as an
external library to my Eclipse project.  Generated the .java classes
from the .proto files. Added the generated .java files to my project.
Ran my project.

I'm not sure if I'm doing something wrong it terms of how to reference
external libraries with an Android project, but 30-45 seconds seems
like a very long time to wait on a 2.6GHz machine.

Also, I recently learned that android uses Protocol Buffers
internally.  Will this cause any sort of conflicts with my
included .jar that could be the problem?  I *think* the namespace is
different but I'm not entirely sure.

Lastly.  Why did Google use Protocol Buffers internally and not make
it available to SDK developers.  :(  This makes me very sad knowing
that it's all right there and I can't use it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to