For a better experience, Gallery used a special design. It works in only one activity and with-out activity jump. Also it expanded GLSurfaceView to display, reload data with multi-thread and cache more data. It loads current used data with priority keep browser smoothly. However, there are still some perfor-mance problems. Oneisthelackofsupportfornewfeaturesinoriginal design,andanotheristhatnewlydevel-opedcodeintroducedperformanceoverhead.Inthisarticle,weanalyzeandexplainhowtoensuretheperformance of gallery based on sourcecodeandcustomizationrequirements.%为了提供良好的用户体验,图库应用使用了特殊的设计。浏览过程没有Activity跳转,界面展示基于GLSurfaceView扩展,数据加载使用多线程和缓存技术相结合,优先加载当前使用的数据信息,保证界面刷新流畅。尽管如此,开发过程中仍会遇到诸多性能问题,一方面是原有系统对新功能的支持不足导致性能难以提升,另一方面是新曾代码方案缺陷。基于图库代码和定制需求相结合,对图库中选择管理组件进行分析,讲解如何从方案上来保证性能,提供良好的用户体验。
展开▼