Menu

iTerm vs Terminal Performance

Prashant
2009-09-24
2013-05-02
  • Prashant

    Prashant - 2009-09-24

    I use iTerm a lot, but am really noticing a difference in the performance quite a lot.

    I'm currently on Snow Leopard, and here is a simple performance numbers.

    I'm running this command:

         time for i in `seq 1 10000`; do echo "JJJJJJSHDKJHSKDJHSJKDHSJKDHSKJHDSAAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDEFFFFFGGGGGGGGGGGGG"; done

    Just to print out and see how long it takes.

    On iTerm, fresh launch:

        real    0m6.562s
        user    0m0.183s
        sys     0m0.049s

    Terminal fresh launch:

        real 0m0.554s
        user 0m0.405s
        sys 0m0.033s

    On second run, it is about 5.5 seconds (real), whereas Terminal stays around 0.55 seconds. Now this is a factor of 10 difference, which gets noticable.

    I'm wondering whether there's any reason for such a huge difference? I love iTerm for the 256 color support mainly, but I currently stick to using Terminal if I'm not editing files as it is much faster.

     
  • James Bunton

    James Bunton - 2009-09-28

    If you're using 0.9.6, you could try one of the test releases. There are significant speed improvements. 0.9.7 should be released soon containing these fixes.

     
  • Prashant

    Prashant - 2009-09-28

    Thanks, I decided to try out the latest iTerm, and ran the same test. I got ~5 seconds instead of the 5.5 -> 6.5, but still not close to Terminal. A factor of 10 difference remains still :(

     
  • James Bunton

    James Bunton - 2009-09-28

    Just to confirm, you're using 0.9.6.20090928?
    On my machine that runs in iTerm.app in 1.4 seconds and Terminal.app in 0.9 seconds.

    You'll notice that during the test Terminal.app skips lots of screen updates, whereas iTerm draws them all. As far as I can tell it seems to redraw less during high load.

    iTerm cannot adaptively adjust its refresh rate, however you can adjust it manually in preferences. Note that if you do this you're trading better responsiveness for interactive editing, etc for better performance when large amounts of text are scrolling.

     
  • Prashant

    Prashant - 2009-09-29

    Yep, latest version, screenshot link to make sure:
    http://www.prashantv.com/files/iTermPerformance.png

    (The computer has a few things open so it is running slower than earlier, but the overall factor of difference is still around the same).

    You were right about the refresh rate, it was set to "fastest". I moved it right by a bit, and it is a LOT faster (however I can notice the slower refresh rate at times).

    Maybe the dynamic scaling of the refresh rate needs work so that it doesn't bother printing when there's a lot of data left int the buffer or something?

     

Log in to post a comment.