After a long period of continuous using, iTerm (iTerm2 Build 3.0.4) seems to slow down a lot. One possible reason is that there are too many commands and texts stored in cache.
You may use the following command to clean the cache and refresh your iTerm session.
history -c