I'm just writing a text editor. Now at the very beginning, I already have a design question: How should I deal with saving? Should I remove the edited file (I'm storing the entire content in RAM) and rewrite it from scratch after the user has made some changes, or only update it somehow? The first variant seems way too unefficient to me, but I wouldn't know how to realise the second one.
I'd be glad to hear some opinions from the optimization specialists around here.
Thanks in advance.