RE : [Axapta-Knowledge-Village] Performance Issue

2005-12-21 Thread Steeve Gilbert










Nice little benchmark
guys.  That's good thing to know.







Regards,

Steeve... 









-Message d'origine-
De:
Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] De la part de Bayliss, Barry
Envoyé: 20 décembre 2005
17:50
À:
Axapta-Knowledge-Village@yahoogroups.com
Objet: RE: [Axapta-Knowledge-Village]
Performance Issue



Hello,





I found the following:





1. Using the TextBuffer
method
0.14 seconds.



2. Using r = r +
a
72.14 seconds



3. Using r +=
a
0.06 seconds





So you may want to use
either the textBuffer method, or the += operator. 



Barry.













From:
Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Sonny Wibawa Adi
Sent: Tuesday, 20 December 2005
5:51 PM
To:
Axapta-Knowledge-Village@yahoogroups.com
Subject: Re:
[Axapta-Knowledge-Village] Performance Issue







Hi, Mohit Rajvanshy,


If you want to perform a big size string operation that performance is an
important role, then you should use TextBuffer class. Just call appendText
method to concatenate the string.

I tried the class and the result is very significant. The results are 68
seconds using plus ('+') operator and 0 second using TextBuffer class.

Here is my code:

static void SWAStringConcatenationPerformance(Args _args)
{
 TextBuffer tb;
 str r,s;
 int i;
 int ts,te;
 ;

 ts = winAPI::getTickCount();

 s = 'My string for testing only.';
 r = '';
 tb = new TextBuffer();

 for (i = 0; i  3; i++)
 {
 //r = r + s;
 tb.appendText(s);
 }

 te = winAPI::getTickCount();
 //info(tb.getText());
 info (strFmt(Finished (%1 - %2 = %3, %4
seconds),
 te,ts,te-ts,(te-ts)/1000
 ));
}
//Finished (23366171 -
23297453 = 68718, 68,72 seconds)
//Finished (23407375 - 23407171 = 204, 0,20 seconds)

Good luck.


mohit rajvanshy
[EMAIL PROTECTED] wrote:

Hi All,

I am trying to fetch the records from a table
which is
having 30,000 + records. I am concatenating the
string. But it is taking too much time for this
operation. Any better idea to perform this
operation ?

TableBuffer tb;
str a;
;
while select tb
{
 a = a +
tb.name;
}

Thanks in advance
Mohit 

Regards
Mohit Rajvanshy


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com








Best regards,


Sonny Wibawa Adi
MBS Certified Professional - Axapta 3.0 Technical
MCSD.NET
MCAD.NET

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 








Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: RE : [Axapta-Knowledge-Village] Performance Issue

2005-12-21 Thread mohit rajvanshy
Thanks a lot Barry.
It is working.


--- Steeve Gilbert [EMAIL PROTECTED]
wrote:

 Nice little benchmark guys.  That's good thing to
 know.
 
 Regards,
 
 Steeve... 
 
  
 
 -Message d'origine-
 De : Axapta-Knowledge-Village@yahoogroups.com
 [mailto:[EMAIL PROTECTED] De
 la part de Bayliss, Barry
 Envoyé : 20 décembre 2005 17:50
 À : Axapta-Knowledge-Village@yahoogroups.com
 Objet : RE: [Axapta-Knowledge-Village] Performance
 Issue
 
  
 
 Hello,
 
  
 
  
 
 I found the following:
 
  
 
  
 
 1. Using the TextBuffer method   0.14
 seconds.
 
  
 
 2. Using r = r + a  
 72.14 seconds
 
  
 
 3. Using r += a 
 0.06 seconds
 
  
 
  
 
 So you may want to use either the textBuffer method,
 or the += operator. 
 
  
 
 Barry.
 
  
 
  
 
   _  
 
 From: Axapta-Knowledge-Village@yahoogroups.com
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Sonny Wibawa Adi
 Sent: Tuesday, 20 December 2005 5:51 PM
 To: Axapta-Knowledge-Village@yahoogroups.com
 Subject: Re: [Axapta-Knowledge-Village] Performance
 Issue
 
  
 
 Hi, Mohit Rajvanshy,
 
 
 If you want to perform a big size string operation
 that performance is an important role, then you
 should use TextBuffer class. Just call appendText
 method to concatenate the string.
 
 I tried the class and the result is very
 significant. The results are 68 seconds using plus
 ('+') operator and 0 second using TextBuffer class.
 
 Here is my code:
 
 static void SWAStringConcatenationPerformance(Args
 _args)
 {
 TextBuffer  tb;
 str r,s;
 int i;
 int ts,te;
 ;
 
 ts  = winAPI::getTickCount();
 
 s   = 'My string for testing only.';
 r   = '';
 tb  = new TextBuffer();
 
 for (i = 0; i  3; i++)
 {
 //r   = r + s;
 tb.appendText(s);
 }
 
 te  = winAPI::getTickCount();
 //info(tb.getText());
 info (strFmt(Finished (%1 - %2 = %3, %4
 seconds),
 te,ts,te-ts,(te-ts)/1000
 ));
 }
 //Finished (23366171 - 23297453 = 68718, 68,72
 seconds)
 //Finished (23407375 - 23407171 = 204, 0,20 seconds)
 
 Good luck.
 
 
 mohit rajvanshy [EMAIL PROTECTED] wrote:
 
 Hi All,
 
 I am trying to fetch the records from a table which
 is
 having 30,000 + records. I am concatenating the
 string. But it is taking too much time for this
 operation. Any better idea to perform this operation
 ?
 
 TableBuffer tb;
 str a;
 ;
 while select tb
 {
 a = a + tb.name;
 }
 
 Thanks in advance
 Mohit 
 
 Regards
 Mohit Rajvanshy
 
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 
  
 
 
 
 Best regards,
 
 
 Sonny Wibawa Adi
 MBS Certified Professional - Axapta 3.0 Technical
 MCSD.NET
 MCAD.NET
 
 __
 Do You Yahoo!?
 Tired of spam? Yahoo! Mail has the best spam
 protection around 
 http://mail.yahoo.com 
 
 
 Sharing the knowledge on Axapta. 
 
 
 
 
   _  
 
 YAHOO! GROUPS LINKS 
 
  
 
 *  Visit your group Axapta-Knowledge-Village

http://groups.yahoo.com/group/Axapta-Knowledge-Village
  on the web.
 
 *  To unsubscribe from this group, send an email to:
   
 [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 
 
 *  Your use of Yahoo! Groups is subject to the
 Yahoo! Terms of Service
 http://docs.yahoo.com/info/terms/ . 
 
  
 
   _  
 
 
=== message truncated ===


Regards
Mohit Rajvanshy


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


 Yahoo! Groups Sponsor ~-- 
$15 provides a child with safe, clean water. Your gift can make a difference.
http://us.click.yahoo.com/vp8GxB/icGMAA/cosFAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




RE : [Axapta-Knowledge-Village] Performance Issue

2005-12-20 Thread Steeve Gilbert
Try with a += instead.

a += tb.name;

Probably not much to gain from since the a = a + tb.name is probably already 
optimized by the compiler.  Just a guess.

Steeve... 


-Message d'origine-
De : Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] De la 
part de Lennart Conrad
Envoyé : 20 décembre 2005 03:37
À : Axapta-Knowledge-Village@yahoogroups.com
Objet : RE: [Axapta-Knowledge-Village] Performance Issue

Another small optimization:
If you only use the name field in your TableBuffer you should only
select that field

While select Name from tb
{

}

-Original Message-
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of mohit
rajvanshy
Sent: 20. december 2005 07:31
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Performance Issue

Hi All,

I am trying to fetch the records from a table which is
having 30,000 + records. I am concatenating the
string. But it is taking too much time for this
operation. Any better idea to perform this operation ?

TableBuffer tb;
str a;
;
while select tb
{
a = a + tb.name;
}

Thanks in advance
Mohit 

Regards
Mohit Rajvanshy


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 





Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 




 Yahoo! Groups Sponsor ~-- 
Put more honey in your pocket. (money matters made easy).
http://us.click.yahoo.com/F9LvrA/dlQLAA/cosFAA/kGEolB/TM
~- 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





RE: [Axapta-Knowledge-Village] Performance Issue

2005-12-20 Thread Bayliss, Barry










Hello,





I found the following:





1. Using the TextBuffer method 0.14
seconds.



2. Using r = r + a 72.14
seconds



3. Using r += a 0.06
seconds





So you may want to use either the
textBuffer method, or the += operator. 



Barry.













From:
Axapta[EMAIL PROTECTED]
[mailto:Axapta[EMAIL PROTECTED]]
On Behalf Of Sonny Wibawa Adi
Sent: Tuesday, 20 December 2005
5:51 PM
To: Axapta[EMAIL PROTECTED]
Subject: Re: [Axapta-Knowledge-Village] Performance Issue







Hi, Mohit Rajvanshy,


If you want to perform a big size string operation that performance is an
important role, then you should use TextBuffer class. Just call appendText
method to concatenate the string.

I tried the class and the result is very significant. The results are 68
seconds using plus ('+') operator and 0 second using TextBuffer class.

Here is my code:

static void SWAStringConcatenationPerformance(Args _args)
{
 TextBuffer tb;
 str r,s;
 int i;
 int ts,te;
 ;

 ts = winAPI::getTickCount();

 s = 'My string for testing only.';
 r = '';
 tb = new TextBuffer();

 for (i = 0; i  3; i++)
 {
 //r = r + s;
 tb.appendText(s);
 }

 te = winAPI::getTickCount();
 //info(tb.getText());
 info (strFmt(Finished (%1 - %2 = %3, %4
seconds),
 te,ts,te-ts,(te-ts)/1000
 ));
}
//Finished (23366171 -
23297453 = 68718, 68,72 seconds)
//Finished (23407375 - 23407171 = 204, 0,20 seconds)

Good luck.


mohit rajvanshy
[EMAIL PROTECTED] wrote:

Hi All,

I am trying to fetch the records from a table
which is
having 30,000 + records. I am concatenating the
string. But it is taking too much time for this
operation. Any better idea to perform this
operation ?

TableBuffer tb;
str a;
;
while select tb
{
 a = a +
tb.name;
}

Thanks in advance
Mohit 

Regards
Mohit Rajvanshy


__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam
protection around 
http://mail.yahoo.com








Best regards,


Sonny Wibawa Adi
MBS Certified Professional - Axapta
3.0 Technical
MCSD.NET
MCAD.NET

__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 







Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











Re: [Axapta-Knowledge-Village] Performance Issue

2005-12-19 Thread Sonny Wibawa Adi



Hi, Mohit Rajvanshy,  If you want to perform a big size string operation that performance is  an important role, then you should use TextBuffer class. Just call  appendText method to concatenate the string.I tried the class and the result is very significant. The results are  68 seconds using plus ('+') operator and 0 second using TextBuffer  class.Here is my code:static void SWAStringConcatenationPerformance(Args _args)  {   TextBuffer tb;   str r,s;   int i;   int ts,te;   ; ts = winAPI::getTickCount(); s = 'My string for testing only.';   r
 = '';   tb = new TextBuffer(); for (i = 0; i  3; i++)   {   //r = r + s;   tb.appendText(s);   } te = winAPI::getTickCount();   //info(tb.getText());   info (strFmt("Finished (%1 - %2 = %3, %4 seconds)",   te,ts,te-ts,(te-ts)/1000   ));  }//Finished (23366171 - 23297453 = 68718, 68,72 seconds)//Finished (23407375 - 23407171 = 204, 0,20 seconds) 
   Good luck.mohit rajvanshy [EMAIL PROTECTED] wrote:  Hi All,I am trying to fetch the records from a table which is  having 30,000 + records. I am concatenating the  string. But it is taking too much time for this  operation. Any better idea to perform this operation ?TableBuffer tb;  str a;  ;  while select tb  {   a = a + tb.name;  }Thanks in advance  Mohit Regards  Mohit Rajvanshy  __  Do You Yahoo!?  Tired of spam? Yahoo! Mail has the best spam protection around   http://mail.yahoo.com   Best regards,Sonny Wibawa AdiMBS Certified Professional - Axapta 3.0 TechnicalMCSD.NETMCAD.NET__Do You Yahoo!?Tired of spam?  Yahoo! Mail has the best spam protection around http://mail.yahoo.com 





Sharing the knowledge on Axapta.





  




  
  
  YAHOO! GROUPS LINKS



  Visit your group "Axapta-Knowledge-Village" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.