used memory profiler to optimize scripted rendering parts