You could start by editing your layouts.

If you make use of <r:comment> (or <r:hide> in 1.0rc3) you can just remove
things from rendering and slowly add them back. That would help you find the
radius code that actually does the calls and perhaps the extension it uses
to generate the content.

-Jim

On Thu, Oct 27, 2011 at 12:13 AM, treydock <treyd...@gmail.com> wrote:

> After some further analysis of the production log, I found a pattern,
> and am at least closer to knowing how to find the issue.  The problem
> is I'm very new to Ruby...but I'm trying to find what in my install is
> calling Page.find such that is produces the pattern below.  Basically
> this loop happens until almost every page is eventually queried.
>
> This is the pattern...
>
> Page Load (7.8ms)   SELECT * FROM "pages" WHERE ("pages"."parent_id"
> IS NULL) LIMIT 1
>  Page Load (1.7ms)   SELECT * FROM "pages" WHERE ("pages"."slug" =
> 'javascripts') AND ("pages".parent_id = 1) ORDER BY virtual DESC,
> title ASC LIMIT 1
>  Page Load (0.7ms)   SELECT * FROM "pages" WHERE ("pages".parent_id =
> 1) ORDER BY virtual DESC, title ASC
>  Page Load (0.3ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
> <repeats a few more times>
> ----------------------------
>
>  Page Load (8.4ms)   SELECT * FROM "pages" WHERE ("pages"."slug" =
> 'javascripts') AND ("pages".parent_id = 88) ORDER BY virtual DESC,
> title ASC LIMIT 1
>  Page Load (0.4ms)   SELECT * FROM "pages" WHERE ("pages".parent_id =
> 88) ORDER BY virtual DESC, title ASC
>  Page Load (0.2ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 88)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 88)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 88)
> <repeats a few more times>
> ----------------------------
> Page Load (0.4ms)   SELECT * FROM "pages" WHERE ("pages"."slug" =
> 'javascripts') AND ("pages".parent_id = 114) ORDER BY virtual DESC,
> title ASC LIMIT 1
> Page Load (0.3ms)   SELECT * FROM "pages" WHERE ("pages".parent_id =
> 114) ORDER BY virtual DESC, title ASC
>  Page Load (0.3ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 114)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 88)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 114)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 88)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 1)
>  CACHE (0.0ms)   SELECT * FROM "pages" WHERE ("pages"."id" = 114)
> <repeats a few more times>
> ----------------------------
>
> Despite it indicating it's using the cache...it does that pattern
> through about 1150 pages before finally loading a single page in the
> browser.
>
> Through some helpful advice I have narrowed things down to these
> possibilities of what may be doing such an exhaustive search of the
> database.  I searched for "Page." and then removed all entries not
> related to "find"...
>
>
> ./vendor/extensions/aaf_search/lib/acts_as_ferret/page_extensions.rb:
> 63:          Page.find_with_ferret(q,
> options)
> ./vendor/extensions/aaf_search/app/models/search_page.rb:163:
> pages =
> Page.full_text_search(@query)
> ./vendor/extensions/copy_move/lib/copy_move/controller.rb:42:
> @parent =
> Page.find(params[:parent_id])
> ./vendor/extensions/copy_move/lib/copy_move/controller.rb:46:
> self.model = @page =
> Page.find(params[:id])
> ./vendor/extensions/copy_move/app/helpers/copy_move_helper.rb:3:
> homes = Page.find_all_by_parent_id
> nil
> ./vendor/extensions/paperclipped/app/controllers/admin/
> assets_controller.rb:6:    @page = Page.find(params[:asset_page]) if
> params[:asset_page]
> ./vendor/extensions/paperclipped/app/controllers/admin/
> assets_controller.rb:25:        @page = Page.find(params[:page])
> ./vendor/extensions/paperclipped/app/controllers/admin/
> assets_controller.rb:96:    @page = Page.find(params[:page])
> ./vendor/extensions/paperclipped/app/controllers/admin/
> assets_controller.rb:108:    @page = Page.find(params[:page])
> ./vendor/extensions/paperclipped/app/models/old_page_attachment.rb:
> 18:      page = Page.find(page_id)
>
> I have no idea what each of those extension's purpose is, maybe
> someone more familiar with Radiant would know which I could start
> looking at.  I think right now I will have to do some debugging and
> inserting breakpoints to figure out exactly what's the problem, but
> I'd like to narrow that search down as much as possible.
>
> Thanks
> - Trey
>
>
>
> On Oct 26, 11:53 am, Jim Gay <j...@saturnflyer.com> wrote:
> > This seems excessive. I took a quick look into
> radiant-fabulator-extension an it's not simple. Is there anything in there
> that would cause this for you?
> >
> > --
> > Jim Gay
> > Saturn Flyer
> > 571 403 0338
> > saturnflyer.com
> >
> > On Oct 26, 2011, at 12:09 PM, treydock <treyd...@gmail.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > radiant-fabulator-extension
>



-- 
Jim Gay
Saturn Flyer LLC
http://www.saturnflyer.com
571-403-0338

Reply via email to