Currently, I am in the process of building an AngularJS frontend and Rails API backend web application. After deploying it onto an Amazon medium EC2 instance, I noticed that the performance was not as impressive as I had hoped, especially when it came to the main page.
To address this issue, I decided to conduct some performance tests and analyze the results using Chrome's tools. It became apparent that there was a significant latency in retrieving js and css resources from the server.
Upon seeking advice on this matter, I stumbled upon a post that discussed the performance comparison between AWS EC2 micro and medium instances:
AWS EC2 micro and medium instances with same performance?
One challenge I faced is the abundance of js files due to separating my app controllers into multiple files, along with a similar situation for css files.
I have come across suggestions stating that storing js and css files in the assets folder within a Rails app and compressing them into one pipeline could enhance performance. However, since my AngularJS and Rails applications are currently separate entities deployed in different locations, implementing this solution poses a challenge.
Although initially pleased with my decision to develop the app in this manner, I now find myself grappling with concerns over its impact on performance. Is there a feasible solution to this dilemma? Can I integrate my controllers and css into the assets of Rails? Alternatively, are there tools available for combining or compressing files in AngularJS?
Perhaps merging both the AngularJS frontend and Rails backend into a single application could be a potential resolution?