Here are some techniques for avoiding long-running actions in the UI thread, using a common example: a table or tree that is filled from some sort of database query, network call, or disk.
有一些技术用来避免UI线程中的长时间运行动作,举一个常见的例子:使用某种数据库查询、网络调用或磁盘进行填充的表或树。
The UI visible in Figures 1, 2, and 3 is a canvas container that holds three user interface components: the table and two menu buttons.
在图 1、2 和 3 中可见的 UI 是一个画布容器,它们包含 3 个用户界面元素:表和两个菜单按钮。
Do not assume you can populate the table on the UI thread.
不要指望您能在UI线程中填充该表。
应用推荐