Apolgies in advance if this is rails thing as its driving my round the
bend knowing how much extra cpu is being burnt

whilst debugging my last issue

config.list.per_page=1 to test out, later change this to 20
added <%=debug record%> to _list_actions and added it as an override
to test out...shock horror on what is going on.

I cant understand this redundancy - to load a row and display only
columns x,y of model A, x,y of model B etc the entire row's records
are loaded IN FULL instead of what is actually needed - the data to be
displayed.

I have in a list view
Manager, Team, Player

A manager (10 fields) has 20 teams, each team(20 fields) has 200
players(30 fields) = 4000 total records, each player has lots of
fields and lots of text

try loading a list of managers with associated teams (limited to
display 5), list the players(first 5 belonging to manager) you get the
full list of objects loaded - given that I have limited
config.columns[:players].associated_limit = 1, it still does a FULL
load of every player record - I still have to reed 4000 player objects
in full, (each player has 30 fields - tons of text/strings etc).  This
is just mind blowing that
columns[:players].associated_limit = 1, doesnt limit any thing, the db
is still read for every record, instead of doing a count (i.e. 1) and
reading the record that needs to be displayed (the first).  The rest
are not needed

Now list 20 managers per page, thats 20000 db objects read for a
single page....whilst only the manager name, team name + count, player
name + count is displayed + EDIT, SHOW.

Then for each security action (CRUD) the process is done again - the
full list of objects are loaded with all associated records read in
full...ouch ouch ouch

I've tested and from what I can see the actual calls to mysql, in the
above example with all options EDIT, SHOW, DELETE a total of 60000
objects were loaded and over 100000 calls to the db....seriously a
joke. FOR 1 PAGE!!!

It makes my skin crawl watching the db go mad like this - I dont like
wasting my poor little CPU on my laptop but this is killing my
machine!!

I know its work in progress but this goes against everything I have
ever learned, why is so much being loaded when it isnt being used,
displayed to the user!

Somebody please help me reduce this down to normality!!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to