Programs uses lots of cpu when starting up