Well, I was able to find the culprit and it wasn't my bad code. It was because I somehow copied same text in a row that led to dialogue file size increased to 32 MB. It wasn't loading in the editor resulting in freezing. It's a huge relief really. Now I can focus on update.