Is there any quickly method for customer paging?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Is there any quickly method for customer paging?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Is there any quickly method for customer paging?  
M.Lee


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-05 12:51 PM

My code like this,but the line
"PostingCollection psts = chl.Postings;"
takes me about 20seconds to response where my channel has 4000 postings.
Is there a better and more quickly method for customer paging?

///////////////////////////////////////////

CmsHttpContext cxt = CmsHttpContext.Current;

Channel chl =
(Channel)(cxt.Searches.GetByPath("/Channels/www.mymcms.com/test"));

PostingCollection psts = chl.Postings;

string[] pstn = new string[10];
int pagenum = int.Parse(this.currpagenum.Value);

if (pagenum<0)
{
pagenum=0;
}
else if (pagenum*10>psts.Count)
{
pagenum = psts.Count/10;
}

int max = 10;

if ((pagenum+1)*10>psts.Count)
max = psts.Count-pagenum*10;

for(int i=0;i<max;i++)
{
pstn[i] = psts[pagenum*10+i].DisplayName;
}
this.DataGrid1.DataSource=pstn;
this.DataGrid1.DataBind();

///////////////////////////////////////////////////////////







[ Post a follow-up to this message ]



    Re: Is there any quickly method for customer paging?  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-28-05 12:51 PM

Hi M,

never(!) use more than 300 direct childs in a container.
This will cause significant performance impact.

See the following two articles for details:
http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm#4009EC9B-3902-4625-93EB-B6F5777BDDF2

http://download.microsoft.com/downl...>
MCMS+2002+-+(complete)+FAQ.htm#EF1C562B-7BF2-4503-85C2-DA150EAA4F1C

For your site please have a look in the following performance planning
whitepaper:
http://www.microsoft.com/downloads/...&DisplayLang=en

Cheers,
Stefan.

"M.Lee" <M.Lee@discussions.microsoft.com> wrote in message
news:054BF22E-D4DB-496F-BE94-2EF7CECAF783@microsoft.com...
> My code like this,but the line
> "PostingCollection psts = chl.Postings;"
> takes me about 20seconds to response where my channel has 4000 postings.
> Is there a better and more quickly method for customer paging?
>
> ///////////////////////////////////////////
>
> CmsHttpContext cxt = CmsHttpContext.Current;
>
> Channel chl =
> (Channel)(cxt.Searches.GetByPath("/Channels/www.mymcms.com/test"));
>
> PostingCollection psts = chl.Postings;
>
> string[] pstn = new string[10];
> int pagenum = int.Parse(this.currpagenum.Value);
>
> if (pagenum<0)
> {
> pagenum=0;
> }
> else if (pagenum*10>psts.Count)
> {
> pagenum = psts.Count/10;
> }
>
> int max = 10;
>
> if ((pagenum+1)*10>psts.Count)
> max = psts.Count-pagenum*10;
>
> for(int i=0;i<max;i++)
> {
> pstn[i] = psts[pagenum*10+i].DisplayName;
> }
> this.DataGrid1.DataSource=pstn;
> this.DataGrid1.DataBind();
>
> ///////////////////////////////////////////////////////////
>
>







[ Post a follow-up to this message ]



    Re: Is there any quickly method for customer paging?  
M.Lee


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-31-05 07:54 AM

Thanks.
But I am regret that MCMS is not fit for my website.

"Stefan [MSFT]" wrote:

> Hi M,
>
> never(!) use more than 300 direct childs in a container.
> This will cause significant performance impact.
>
> See the following two articles for details:
> http://download.microsoft.com/downl...
a/MCMS+2002+-+(complete)+FAQ.htm#4009EC9B-3902-4625-93EB-B6F5777BDDF2
>
> http://download.microsoft.com/downl...
a/MCMS+2002+-+(complete)+FAQ.htm#EF1C562B-7BF2-4503-85C2-DA150EAA4F1C
>
> For your site please have a look in the following performance planning
> whitepaper:
> http://www.microsoft.com/downloads/...&DisplayLang=en
>
> Cheers,
> Stefan.
>
> "M.Lee" <M.Lee@discussions.microsoft.com> wrote in message
> news:054BF22E-D4DB-496F-BE94-2EF7CECAF783@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:56 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register