How to do GIF animations for instructions and learning purposes over GUI? [duplicate]

I am trying to categorize many similar threads here.

For example, I find this GIF animation freaking cool in this answer here. How can I do this kind of animations? How can I make sure it does not consume too much CPU with less CPU-intensive computers? How can I do professional screencast?


Please, see the threads below.

Unix Stackexchange

  1. Creating a GIF animation from PNG files

  2. Convert OGV video to GIF animaton

  3. Are there any animation programs for animating static images

Ubuntu Stackexchange

  1. How to create animated GIF images of a screencast?

  2. How to record my screen?