Lets add some optimzation

Based on https://gerrit.slimroms.net/#/c/5973/