Long time ago I learned that text files are not like Random access Files, i. e., adding or updating info at the beginning of a text file involves moving all the rest of the file "forward" (or backwards if the size of the new info is smaller than the former info) in storage to let some space. This takes time and space in memory, even using buffers.
Moreover modern IDEs seem to flush all the buffers when saving files in case a failure occurs.
My point is: Am I right presuming that editing a huge text file with autosave enabled is slower when done at the beginning of the file or are there some tricks involved I'm not aware of?
Maybe the lack of really fast secondary storage (like SSD) until a few years ago made this autosave not so common? Can anybody perhaps enlighten me?
I've read https://softwareengineering.stackexchange.com/a/273524/336500 but I'd prefer an answer from the point of view of a programmer, like
What type of File Decorator would you use to implement autosave feature in Java?, for example.