Trying to figure out why performance is slow