Forum .LRN Q&A: Re: .LRN v2 Performance

Collapse
35: Re: .LRN v2 Performance (response to 1)
Posted by Nima Mazloumi on
Alright,

here is the solution:

Moved out the part

"[subsite::get_element -element url -notrailing][ad_parameter -package_id [ad_acs_kernel_id] CommunityMemberURL]"
from acs_community_member_url into a new proc called:
ad_proc -public acs_community_member_page {} {  
     @return the url to the community member page  
 } { 
     return "[subsite::get_element -element url -notrailing][ad_parameter \ 
             -package_id [ad_acs_kernel_id] CommunityMemberURL]" 
 }
which is now used by acs_community_member_url internally:
return "[acs_community_member_page]?[export_vars user_id]" 
now the member_url is generated by this. Outside db_multirow we get the member_page only once:
set member_page [acs_community_member_page]
and then add the user_id for a given user inside db_multirow:
set member_url "$member_page?user_id=$user_id"
This shouldn't break anything. I committed that to oacs-5-1