improve rendering performance