this should only happen after hte loop is done. Create a list and append them in one swoop. Hitting the dom for each node created will slow things down.