My RCP application contains 5 views which fill contents via database queries.
我的RCP应用程序包含5个视图,它们通过数据库查询填充内容。
The problem is that the application start completely depends on database queries. In addition, if underlying db is closed the application start time takes too long.
问题是应用程序完全依赖于数据库查询。此外,如果底层db被关闭,那么应用程序的启动时间就太长了。
What is the best practice for eclipse rcp views that use db as content source? Is using a separate thread for filling views be a solution?
eclipse rcp视图使用db作为内容源的最佳实践是什么?使用单独的线程填充视图是一种解决方案吗?
1 个解决方案
#1
3
Move all your view updating code into an UIJob, then schedule it. User can find the progress of these tasks in the progress view if it is included in your RCP. In addition, one UIJob takes care one view.
将所有视图更新代码移动到UIJob中,然后调度它。如果这些任务包含在RCP中,用户可以在progress视图中找到它们的进度。另外,一个UIJob关心一个视图。
#1
3
Move all your view updating code into an UIJob, then schedule it. User can find the progress of these tasks in the progress view if it is included in your RCP. In addition, one UIJob takes care one view.
将所有视图更新代码移动到UIJob中,然后调度它。如果这些任务包含在RCP中,用户可以在progress视图中找到它们的进度。另外,一个UIJob关心一个视图。