What speed tricks are developers using for sites with large number of
content objects?
 
I have a lot of content objects -- around 10,000 I think. Most of them will
be paginated through with their teasers and thumbnail images showing.
 
My typical teaser webskin:
 
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin">
<cfimport taglib="/farcry/core/tags/formtools" prefix="ft">
 
<cfoutput><div class="teaser"><div class="teaser text"
style="#iif(len(stObj.imageid),de("width:400px;"),de(""))#"></cfoutput>
<skin:buildlink class="check" objectid="#stObj.objectid#"
linktext="#stObj.title#" />
<cfoutput><br class="clear" />Owner Organization: </cfoutput>
<ft:object format="display" objectid="#stObj.owner#" lFields="title"
r_stFields="stFields" />
<skin:buildlink objectid="#stObj.owner#" linktext="#stfields.title.html#" />
<cfoutput><br class="clear" /><cfif len(stObj.subtitle)>#stObj.subtitle#
<BR></cfif><em>Completion Date: <cfif
len(stObj.completiondate)>#dateformat(stObj.completionDate,"mm/dd/yyyy")#
<cfelse>Not Known </cfif>Published #dateformat(stObj.publishdate,"mmmm dd,
yyyy")#</em><p>#stObj.Teaser#</p></div></cfoutput>
<cfif len(stObj.imageID)>
 <cfset
imagePath=createObject("component",application.stcoapi.dmimage.packagepath).
getURLImagePath(stObj.ImageID,"thumb")>
 <cfoutput><div class="thumbnail" align="center"><img src="#imagepath#"
border="0" width="100px"></div></cfoutput>
</cfif>
<cfoutput></div></div></cfoutput>
 
 
I have ObjectBroker enabled for each type's webskins (including teasers),
but the pagination is still pretty slow and I'm the only one browsing it.
(The pagination is quick once the dmHTML page with the archive rule is
cached.)
 
I am considering scheduling a task to run at o-dark-thirty to pre-cache what
I can (mostly the teasers since the display methods use a lot of request
scope references) -- 
 
<cfset
o=createobject("component",application.stcoapi.tlprojectprofile.packagepath)
>
 
<cfquery name="qGetData" datasource="#application.dsn#">
 select top 200 objectid,displayMethod from tlProjectProfile
 order by publishdate desc
</cfquery>
<cfoutput>#qGetData.recordcount#</cfoutput>
<cfloop query="qGetData">
 <cfset o.getView(objectid=qGetdata.objectid,template="displayTeaser")>
</cfloop> 
 
So far when trying this I run out of memory. 
 
Derek

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" 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/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to