It shouldn’t affect performance or memory in a bad way. You may just possibly notice some weird buggy behavior of the sub menus or incorrect parent item highlighting, etc. But I will need to test a live demo in order to figure out if any major issues might happen with your exact code.