Android上的RPC会导致GC_EXPLICIT [英] RPC on android causes GC_EXPLICIT

查看:120
本文介绍了Android上的RPC会导致GC_EXPLICIT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要我的本地SQLite数据库与远程MySQL数据库同步。
我测试不同的 XMLRPC JSONRPC 项目这样做。

I need to synchronize my local sqlite database with a remote mysql database. I'm testing different XMLRPC and JSONRPC projects to do so.

我发送包含arn't尚未同步的每个表中的所有条目的数据包。

I send a packet containing all entries that arn't synced yet for each table.

在这些RPC项目解析数据logcat中充满了 GC_EXPLICIT

When these RPC projects are parsing the data logcat is filled with GC_EXPLICIT.

GC_EXPLICIT意味着垃圾
  收藏家已明确要求
  收集,而不是由被触发,
  高水痕堆中。发生
  所有的地方,但最有可能
  当一个线程被杀害或当
  粘合剂通信取下来。 〜罗伯特

GC_EXPLICIT means that the garbage collector has been explicitly asked to collect, instead of being triggered by high water marks in the heap. Happens all over the place, but most likely when a thread is being killed or when a binder communication is taken down. ~ Robert

我试图修改XMLRPC项目执行我所需的操作条目从分组读取,然后使用相同的对象变量来实例化一个条目的后面。

I tried to modify a XMLRPC project to perform my desired actions right after an entry is read from the packet and then use the same object variable to instantiate the next entry.

然而,这并不能解决收集请求的垃圾收集器。

This however does not solve the collect requests to the garbage collector.

你知道吗?提示?建议?

Any idea? tips? suggestions?

推荐答案

我前几天解决我的问题。

I solved my problem a couple days ago.

我使用的是由Alex(项目做出了Android JSON RPC模块)。

I'm using the Android JSON RPC module made by Alex (project).

我删除其中模块解析JSON的一部分。并使用正则表达式创建了自己的解析程序。该模块还执行SQLite的查询的,而不是创建JSON对象。

I removed the part where the module parses the JSON. And created my own parse routine using regex. The module also performs SQLite query's instead of creating JSON objects.

我改变的另一件事是,该模块将接受和最多1000个条目的接收多个数据包。

Another thing I changed is that the module will accept and receive multiple packets with a maximum of 1000 entries.

在code是extreemly快,花了30分钟,同步3000项,现在只需要3分钟。为什么我不是张贴code此信息的原因是因为code是非常具体项目。

The code is extreemly fast, it took 30 minutes to synchronize 3000 entries, now it only takes 3 minutes. The reason why I'm posting this information instead of the code is because the code is very project specific.

有关如何循环,为什么不拨出超过1000对象的信息中的 Android的性能文档

Information about how to loop and why not to allocate over 1000 objects is described in the android performance document.

这篇关于Android上的RPC会导致GC_EXPLICIT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆