A quick tip would be to run everything process intensive in the backend, don't waste frontend resources with API calls, data processing etc, got something that takes more than 200ms to run, place it in a job que and do the processing later.
Some tools for the job: https://github.com/defunkt/resque https://github.com/tobi/delayed_job
Also don't forget to cache. You shouldn't worry too much if you do these two properly.