• Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there a performance difference writing to a large file (vs a empty one)  RSS feed

 
Roger Graff
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know if writing ascii data to a very large file (say, 5 M) is slower than writing to a small (5kb) or empty file? Assume that the new data is appended to the end of the file.
-Graff
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Interesting question. Would you try it and let us know? Maybe make up a 1k string and write it to some file in a loop until out of disk space, report the time spent on every write?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!