This week, I mostly spent all my time adding the final touches to the web browser portion of the application. In particular, I added animations between views.
This seems like easy task, but actually ended up taking many hours for multiple days. The animation is quite advanced. The animation blurs the lines between views, making it seem like the user is always on one view and objets are just animating around based on user touch.
On top of completing this animation, I found out the app had a retain cycle. This caused objects to never be deallocated, resulting in the app consuming lots of memory. I spent about two full days reading about detecting retain cycles and eventually found what was causing the leak. In the end, I was able to reduce the app’s memory usage from 700 MB to just under 200 MB after a few minutes of user interaction!
Further, I discovered other changes I can make to improve performance. Instead of loading full image sizes from disk, I can load thumbnail-sized images for cells to improve fetching speeds. I can also load these images asynchronously from local disk to reduce overhead. And I also notice that I can significantly reduce the number of times I am fetching data from the disk. I expect these changes to further reduce memory by at least 50%. I will work on them in the coming weeks.
My goal this week is to spend more time on readings. I also wrote a brief abstract for my thesis and have a solid idea of the type of readings I need to do. I’m thinking that for at least the next month, I will be alternating every week between working on the application and reading/writing the thesis.