Introduction
I have a (mostly) single-page application built with BackboneJS and the Rails backend.
Since most of the interaction takes place on one webapp page, when the user first visits the page, I basically need to pull a ton of information from the database in one large, deeply connected query.
This causes me some extreme loads on this page.

NewRelic seems to tell me that most of my problems are related to 457 individual quick method calls.

Now I have done all the downloaded download that I can do (I checked with the Bullet gem ) and I still have a problem.
These method calls most likely occur in my Rabl serializer , which I use to serialize the JSON bundle to insert into the page to initialize the trunk. You do not need to understand all this, but suffice it to say that it can add up to 457 method calls.
object @search
attributes :id, :name, :subscription_limit
child :searchers => :searchers do
attributes :id, :name, :gravatar_icon
end
child :concepts do |search|
attributes :id, :title, :search_id, :created_at
child :suggester => :suggester do
attributes :id, :name, :gravatar_icon
end
node :suggestions do |concept|
partial "suggestions/show", object: concept.active_suggestions
end
node :favourite_id do |concept|
concept.favourite_id_for(current_user)
end
end
child :service_subscriptions do
extends "service_subscriptions/show"
end
So it seems that I need to do something, but I'm not sure which approach to take. Here is a list of potential ideas that I have:
Performance Improvement Ideas
Drop the interface.
Perhaps I can come up with ways to provide information to a user who does not require actual data. I don’t understand why I need this, but other single-page applications, such as Trello , have incredibly complex interfaces.
, , . .
. , , . , , , .
, JSON , , , , , , , .
, . , (, ?) .
, , , . , .
- - , ?