News for hackers. Stuff that matters.
Re:My Most Important Project Was a Bytecode Interpreter by hawski on Thursday September 22, 2016 @11:52AM (#12557712)
With both emacs and vim you can certainly edit 500MB file. I concatenated all sources of recent Linux kernel 4.6.3 once. From what I remember it was all .c, .h and .S files. Resulting file has 542MB and 19'726'498 lines. I did it to test the text editor I am working on.

Some stats:

  $ time vim -c 'edit kernel-total' -c q
  real	0m8.162s
  user	0m7.687s
  sys	0m0.398s
  $ vim kernel-total ^Z
  $ ps aux | awk "/kernel-total$/ || NR == 1"
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  hawski   10467  2.7 17.1 805120 670988 pts/2   T    17:41   0:07 vim kernel-total
  $ time emacs kernel-total -f kill-emacs
  real	0m7.155s
  user	0m6.869s
  sys	0m0.237s
  $ emacs kernel-total ^Z
  $ ps aux | awk "/kernel-total$/ || NR == 1"
  USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
  hawski   10825 43.8 14.8 857484 581152 pts/2   T    17:47   0:07 emacs kernel-total
With vim editing is quite smooth and with emacs it feels laggy. I only edited a bit, like entering a new line here and there, moving few pages down, going to the end of the file and to the top again. Saving is sluggish.

There are no comments on this comment yet.