资源加载器
1. 特定资源加载器,加载特定资源,比如image对应ImageLoader
2. 缓存机制的资源加载器,CachedResourceLoader

3. 通用资源加载器,ResourceLoader
只负责获取资源的数据

加载一个src对应有效的URL地址的image元素,浏览器调用imageLoader特定资源加载器,去查看缓存情况,调用cacheResourceLoader,存在缓存并可用,使用缓存,否则调用·resourceLoader去获取缓存数据
资源生命周期
采用LRU算法(Least Recent Used 最近最少使用)算法,去更新资源池中的数据

多进程资源加载
主要多个Render进程和Browser进程之间的调用栈涉及的主要类
render进程资源的获取是通过进程间通信将任务交给Browser进程完成
网友评论