Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjwchn committed Mar 4, 2016
1 parent 552d4fd commit 394673a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,40 @@ view.addSubview(imageView)
####1.Display just one GIF image
####1.1 CPU usgae:
######JWAnimatedImage<p>
![JW_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/JW_CPU1.png)<p>
![JW_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/JW_CPU1.png)<p>
######FLAnimatedImage<p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/FL_CPU1.png)<p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/FL_CPU1.png)<p>
######SwiftGif<p>
![SG_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/SG_CPU.png)<p>
![SG_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/SG_CPU.png)<p>
####1.2 Memory usage:
######JWAnimatedImage<p>
![JW_MEM](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/JW_MEM1.png)<p>
![JW_MEM](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/JW_MEM1.png)<p>
######FLAnimatedImage<p>
![FL_MEM](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/FL_MEM1.png)<p>
![FL_MEM](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/FL_MEM1.png)<p>
######SwiftGif<p>
![SG_MEM](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/SG_MEM.png)<p>
![SG_MEM](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/SG_MEM.png)<p>
> I've discussed the high memory usage of FLAnimatedImage with [@mitchellporter](https://github.com/mitchellporter) and confirmed this problem does exist,you can see it [here](https://github.com/wangjwchn/JWAnimatedImage/issues/1)<p>
> From the graph,we can see that SwiftGif isn't processing the memory usage.<p>
####2.Display 30 GIF images
####Like this:
![DEMO](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/DEMO.jpg)<p>
![DEMO](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/DEMO.jpg)<p>
####2.1 CPU usgae:
######JWAnimatedImage<p>
![JW_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/JW_CPU2.png)<p>
![JW_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/JW_CPU2.png)<p>
######FLAnimatedImage<p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/FL_CPU2.png)<p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/FL_CPU2.png)<p>
###### ...... <p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/FL_CPU3.png)<p>
![FL_CPU](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/FL_CPU3.png)<p>
> There is no benckmark graph for SwiftGif because it crash immediately caused by high memory usage.<p>
> For each image,FLAnimatedImage create a new thread and run independently.From the graph,we can see there are 36 threads when we load 30 GIF images,that will cause a heavy CPU usage.<p>
> So in JWAnimatedImage,we use 'global queue' by 'GCD' to handle these tasks together.That makes the number of threads down to 10,and those threads are dynamic.From the graph,we can see some of them are just start.<p>
####2.2 Memory usage:
######JWAnimatedImage<p>
![JW_MEM](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/JW_MEM2.png)<p>
![JW_MEM](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/JW_MEM2.png)<p>
######FLAnimatedImage<p>
![FL_MEM](https://raw.githubusercontent.com/wangjwchn/JWAnimatedImage/master/BenchmarkPicture/FL_MEM2.png)<p>
![FL_MEM](https://raw.githubusercontent.com/wangjwchn/BenchmarkImage/master/FL_MEM2.png)<p>
> I think JWAnimatedImage is better than FLAnimatedImage in cpu and memory usage.<p>
##Licence
Expand Down

0 comments on commit 394673a

Please sign in to comment.