Good loop value for clear chat?
#1

How much value is good and very efficient for clear chat console?
Reply
#2

20 lines (pagesize) * 5 pages (Page Up/Down) = 100
Reply
#3

70 maybe there is not reason to add 100 its to much
Reply
#4

I wonder though, what would be faster/more efficient, nr 1 or nr 2?

Nr 1:
PHP код:
for( new 0100i++ )
{
    
SendClientMessageToAll( -1" " );

Nr 2:
PHP код:
for( new 050i++ )
{
    
SendClientMessageToAll( -1" " );
    
SendClientMessageToAll( -1" " );

Or what if you'd divide it by 3, or 4, and send 3 or 4 sendclientmessages per loop?
Reply
#5

Quote:
Originally Posted by Smileys
Посмотреть сообщение
I wonder though, what would be faster/more efficient, nr 1 or nr 2?

Nr 1:
PHP код:
for( new 0100i++ )
{
    
SendClientMessageToAll( -1" " );

Nr 2:
PHP код:
for( new 050i++ )
{
    
SendClientMessageToAll( -1" " );
    
SendClientMessageToAll( -1" " );

Or what if you'd divide it by 3, or 4, and send 3 or 4 sendclientmessages per loop?
Number 2 because natives are alot faster then PAWN coding.
Reply
#6

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
Number 2 because natives are alot faster then PAWN coding.
So, if I add 10 SCM in 1 loop, and loop it 10 times, is it still faster or does it slow down at some point?
Reply
#7

Quote:
Originally Posted by Smileys
Посмотреть сообщение
So, if I add 10 SCM in 1 loop, and loop it 10 times, is it still faster or does it slow down at some point?
Yes.

I am not sure though, I am just talking depending on something that ****** said somewhere on the forums.. If someone can confirm it... It'd be better.
Reply
#8

For other cases, Ahmad45123 is correct but here the code won't even take 1 ms to be executed.

Quote:
Originally Posted by kyriakos587
Посмотреть сообщение
70 maybe there is not reason to add 100 its to much
I use 20 lines on chat (/pagesize 20) so I will still be able to read the previous text.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)