ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Code optimization help please

October 26, 2012 7:33am

Subscribe [3]
  • #1 / Oct 26, 2012 7:33am

    Mediakitchen

    261 posts

    I need to optimise the following code and therefore seek assistance doing so if anyone can suggest any optimizations.

    Note collections is a table I have created in the database and it only has a handful of records and only 3 fields.

    This code may or may not be the culprit causing me fatal out of memory errors but I would like to ensure it is as optimised as possible.

    {exp:query sql="SELECT id, libraryitemid FROM collections WHERE id = '{logged_in_member_id}' "}
     
     
      {exp:channel:entries channel="library_items" entry_id="{libraryitemid}" dynamic="no" disable="categories|member_data|pagination"}
    
      {title}
        
    
      {/exp:channel:entries} 
    
     
    
     {/exp:query}

     

  • #2 / Oct 26, 2012 1:52pm

    Boyink!

    5011 posts

    What do the output profiler and template debugger have to say when you turn them on?  Any red flags there?

  • #3 / Oct 29, 2012 11:05am

    Shane Eckert

    7174 posts

    Hey Mediakitchen,

    Thank you for posting your question.

    Mike is right, the best place to start is to enable the template debugger and see what the queries are doing.

    To turn debugging on please go to your Control Panel and navigate to Admin->System Administration-> Output and Debugging. Please set “Display Output Profiler?” to yes.

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases