Greatly boosted performance by replacing a number of call to t_wrefresh() with optimized pairs of t_wnoutrefresh() and t_doupdate()