Whenever Piwik gets slow you will have to setup cron archiving: http://piwik.org/docs/setup-auto-archiving/
By default, Piwik will aggregate data when you a) make an API request - b) Load the dashboard (which in fact calls the API). Cron archiving makes this process faster by processing all the data beforehand so that the API can simply request it from the DB.