光标窗口:窗口是全 [英] Cursor window: window is full

查看:319
本文介绍了光标窗口:窗口是全的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建填充通过从查询返回的数据一个ListView。
它的工作原理,但在LogCat中我已经得到了消息:

I've created a ListView populated by the data returned from a query.
It works, but in the LogCat I've got the message:

Cursor Window: Window is full: requested allocation 444 bytes, free space 363 bytes, window size 2097152 bytes

和它使用一两分钟的装载/可视化的ListView。

and it uses a couple of minutes for loading / visualizing the ListView.

我的查询返回3700行字符串/ INT /双,其中每30列;没有图像或特定的数据类型

My query returns about 3700 rows of String/Int/Double, each of which with 30 columns; no images or particular datatypes

这是什么消息,恰恰意味着,我怎么能避免呢?
您可以通过更改此光标窗口提高性能?​​

What does this message exactly mean and how can I avoid it?
Can you improve performances by changing this Cursor Window?

推荐答案

从我的经验,这意味着查询结果是太大,光标的窗口,它请求更多的内存。大多数时候,这个要求很荣幸,但在低端设备也可能抛出异常。

From my experience this means that the query results are too large for the cursor's window and it requests more memory. Most times this request is honored, but on low end devices it could throw exceptions.

我不知道有问题的应用程序的具体细节,但你提到一个ListView。一个ListView无法显示3700行一次和无尽的列表可以帮助加载数据按需

I don't know the specifics of the app in question but you referred to a ListView. A ListView cannot show 3700 rows at once and a endless list could help to load the data on demand

我的建议是打破了查询到返回较小的结果并运行一个查询之前关闭他们多次查询。每个连续的查询后结合的结果。

My advise is to break up the query into a multiple queries that return smaller results and close them before running the next query. After each successive query combine the results.

这篇关于光标窗口:窗口是全的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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