English 中文(简体)
清单调查
原标题:Listview s ArrayAdapter notifydatasetchanged() very slow redraw

我提出一个非常简单的清单,每个行各有3个文字调查领域。 我们正在每两秒更新其价值,其数据来自背景网络服务电话(AsyncTask)

我们把今后的价值观与目前的价值观进行比较,据此更新适应器,最后在必要时通知DataSetChanged()

事实是,当我们一劳永逸地更新了3个以上的新行时,重新布局确实进展缓慢,从而hang倒了整个国际不动产。 当然,我们正在使用所有众所周知的《意见》最佳化方法,例如高效应用方法(Tag()和持有人),并获取《意见书》。 我们还努力尽可能优化与布局的接口,并努力避免包装——连续的宽度和高度,以缓解事情。

我们要么在更新方面花钱,要么仅仅在标准方面:改变文字措辞、文字col和背景 values价值。

我所能看到的唯一一件令人难过的事情是,每行3-4至5次,尽管我已经读到所有罗姆人的电文......? *** 说这同这毫不错。

任何想法或暗示我们如何能够加快这一进程?

非常感谢!

http://groups.google.com/group/android-developers/browse_thread/thread/4c4aeddefe4594/aeb04288064f495e?show_docid=aeb04288064f495e”rel=“noreferer” http://groups.google.com/group/android-developers/browse_thread/thread/4c4aeddefe4594/aeb04286480449f495e_ida04

问题回答

对于那些从神学到需要改写自己数据的方法的人来说,这是这样。 根据我的数据,你不需要多起案件。

样本:通过菜单选择更新的简单3线文本清单概览,最大10K row

手册:说明DataSetChange()

--- avg run-time: 4ms

Default free notificationDataSetChange()

--- avg run-time: 0ms <--- you can t get faster than this.

除非你的时间和基准,否则你就会自行更换。 在必要之前使用免费 st。

我相信,你能够树立一个tag子, text。 视之为从中获取最新信息的途径。 而不用说“注意到DataSetChanged()”,你可以尝试利用“URL”(最新版)”和“Text for that view,因此,案文概览只是重复而不是整个清单。 能够充分减少额外休息次数。 只是一个想法。





相关问题
What to look for in performance analyzer in VS 2008

What to look for in performance analyzer in VS 2008 I am using VS Team system and got the performance wizard and reports going. What benchmarks/process do I use? There is a lot of stuff in the ...

SQL Table Size And Query Performance

We have a number of items coming in from a web service; each item containing an unknown number of properties. We are storing them in a database with the following Schema. Items - ItemID - ...

How to speed up Visual Studio 2008? Add more resources?

I m using Visual Studio 2008 (with the latest service pack) I also have ReSharper 4.5 installed. ReSharper Code analysis/ scan is turned off. OS: Windows 7 Enterprise Edition It takes me a long time ...

Manually implementing high performance algorithms in .NET

As a learning experience I recently tried implementing Quicksort with 3 way partitioning in C#. Apart from needing to add an extra range check on the left/right variables before the recursive call, ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

热门标签