Writing a file means that all the data has to pass trhough the file system, the io driver, the disk controller interface onto the disk with a certain maximum write speed. If the file is large then it will take a long time. The 'bookkeeping' to administer where the file goes is a very small portion compared to the data of the file in such cases.
When you delete the data you only update the bookkeeping, so that's much quicker.
If you were to erase the file then it would take just as long as writing it in the first place.
Comments
Writing a file means that all the data has to pass trhough the file system, the io driver, the disk controller interface onto the disk with a certain maximum write speed. If the file is large then it will take a long time. The 'bookkeeping' to administer where the file goes is a very small portion compared to the data of the file in such cases.
When you delete the data you only update the bookkeeping, so that's much quicker.
If you were to erase the file then it would take just as long as writing it in the first place.