you are viewing a single comment's thread
view the rest of the comments
[+] -18 points 4 months ago (15 children)

Who cares about file size? It would be more impressive to optimize it for better performance / less memory usage

  • source
  • hideshow 15 child comments
  • [–] 26 points 4 months ago* (last edited 4 months ago) (14 children)

    I suspect a 2.5kb application would probably load quickly and use little memory.

    Edit: I'm an illiterate dumdum. Don't upvote.

  • source
  • parent
  • hideshow 14 child comments
  • [–] 22 points 4 months ago (2 children)

    One user reported it chewing through around 500MB of RAM on 64-bit Windows 7

    It says this right in the article. Is reading the article too much to ask?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 23 points 4 months ago

    They don't say the scenario where that's happening, though. Unless your editor supports large file editing, a mode where it doesn't load the whole file into memory, unless it has filesize restrictions that make it just fail, if you throw a large enough file at it, it's invariably going to use a bunch of memory.

    $ dd if=/dev/zero of=out.bin bs=1M count=500
    500+0 records in
    500+0 records out
    524288000 bytes (524 MB, 500 MiB) copied, 0.100949 s, 5.2 GB/s
    $ vim out.bin
    

    On my system, after it (slowly) finishes opening that file, vim's using 511MB RSS. I know that vim has some sort of large file editing support, though not how to use it.

    On emacs, large file editing support is from the vlf package.

    $ emacs
    M-x vlf RET
    out.bin RET
    

    Emacs is using 75.3 MB RSS after opening that.

  • source
  • parent
  • [–] 11 points 4 months ago* (last edited 4 months ago) (10 children)

    Size on disk doesn't correlate to memory usage or load time. You can get a very small on disk size by compression, or downloading the main executable at runtime.

  • source
  • parent
  • hideshow 10 child comments
  • [–] 6 points 4 months ago (3 children)

    Sure. I wasn't thinking of something like .kkreiger. I assumed that a small simple text editor would use a similarly small amount of memory. Shocked it ballooned so big. Sorry can't read the article at the moment.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 4 months ago (2 children)

    The premise is probably if you can optimize the code to be small, you are probably also optimizing how it runs too. Rather then just bloat up everything

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 4 months ago (1 child)

    Once you start optimizing for one aspect, others become less important. In this case, they are doing a few hacks to get to 2.5kb, which do impact runtime performance. A few users report it using 500mb at runtime due to the compression :/

  • source
  • parent
  • hideshow 1 child comment