Render only if neccessary

Rebder the text only if there was an event or the file has new content.