rstimecourse2 severe performance and memory improvements