found performance issue belonging to onpaint-event
fixed performance issue