CFDEV wrote:
>  
> I have an include for a dynamic side menu and there is a lot of data in the
> menus. There is 3 level of menus and hte guy who programmed it made loops
> inside of loops with different queries. I'm looking for a way to optimize
> this since it's taking 1000 ms to load.
>  
> I looked at the cache options but it's not really an option since the color
> of the menu change from a variable in the url.

The color is something you could put in a stylesheet. Then the 
query and the HTML for the menu is the same all the time, you 
just include a few lines of different CSS with each page.


> query menu
>  
> loop over menu
>  
>     query submenu for this menu
>  
>         if there is submenu
>  
>             loop over sub menu
>  
>                 query subsubmenu for this submenu
>  
>                     if there is subsubmenu
>  
>                         loop over subsubmenu

This looks like something you could do in one query using outer 
joins.

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196358
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to