Implement the limit size twin twig gen on the fly
Still have problems in the twintwig one repeat problem. 

Change-Id: Ic22ae440f24dfe77f15a4d358854390ad3bf5ed5