SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 24/10/2016, 02:38 AM   #21
JustMe.77
Huge Clucker
 
JustMe.77's Avatar
 
Join Date: Jun 2013
Location: Germany
Posts: 268
Reputation: 63
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

This is extremely well explained and you've put much effort into it !
I'm really thinking about rewriting all my commands
JustMe.77 is offline   Reply With Quote
Old 24/10/2016, 03:05 AM   #22
Dayvison_
High-roller
 
Dayvison_'s Avatar
 
Join Date: Nov 2013
Posts: 1,324
Reputation: 200
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Maybe you can add ReassignCommandFunctionForPlayer?

This is very good, i have some issues with pawn.cmd i certainly will use
Dayvison_ is offline   Reply With Quote
Old 24/10/2016, 03:18 AM   #23
Gammix
High-roller
 
Gammix's Avatar
 
Join Date: Jan 2015
Location: Canada
Posts: 1,806
Reputation: 831
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Command declaration is what i found interesting. ☺
__________________

My GitHub:

Gammix is offline   Reply With Quote
Old 24/10/2016, 06:40 AM   #24
CantBeJohn
Big Clucker
 
CantBeJohn's Avatar
 
Join Date: Oct 2016
Posts: 87
Reputation: 15
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

The fight for the fastest command processor is starting to seem more competitive than the Trump vs Hilary campaign.


I'm just going to keep switching to the fastest regardless though and this seems pretty nice.
CantBeJohn is offline   Reply With Quote
Old 24/10/2016, 06:55 AM   #25
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 868
Reputation: 295
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Quote:
Originally Posted by Stinged View Post
I don't know if there's another way around this, but for now, place the command anywhere above the callback where you're using cid_yourcommand.
I think I can make a fix for the scope problem.

Quote:
Originally Posted by Stinged View Post
The total number should not exceed 16 if you use (<<=2), it should be (<<=1)
Oops. Fixed. ty

Quote:
Originally Posted by CantBeJohn View Post
The fight for the fastest command processor is starting to seem more competitive than the Trump vs Hilary campaign.


I'm just going to keep switching to the fastest regardless though and this seems pretty nice.
I can make this faster than SickAttack's command processor but I would prefer to keep the dignity of the code. The improvements in performance are insignificant.

Last edited by Yashas; 24/10/2016 at 04:53 PM.
Yashas is offline   Reply With Quote
Old 24/10/2016, 08:15 AM   #26
AndySedeyn
High-roller
 
AndySedeyn's Avatar
 
Join Date: Feb 2014
Location: Belgium
Posts: 1,330
Reputation: 681
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Quote:
Originally Posted by Yashas View Post
I can make this faster than SickAttack's command processor but I would prefer to keep the dignity of the code. There improvements in performance are insignificant.
Thank you! I absolutely love the complexity yet simplicity of this processor.
AndySedeyn is offline   Reply With Quote
Old 24/10/2016, 09:34 AM   #27
Yashas
Gangsta
 
Join Date: Jun 2012
Location: India
Posts: 868
Reputation: 295
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Test code for SickAttack's include: http://pastebin.com/EJR7y49A

Results:
Quote:
[14:56:51] 1068
[14:56:52] 1078
[14:56:53] 1075
[14:56:54] 1070
[14:56:55] 1079
[14:56:56] 1071
[14:56:57] 1091
[14:56:58] 1063
[14:57:00] 1067
[14:57:01] 1062
[14:57:01] Average: 1072.40
SmartCMD test code: http://pastebin.com/ZWxA6p6a

Quote:
Results:
[14:57:48] 933
[14:57:49] 939
[14:57:50] 951
[14:57:51] 942
[14:57:52] 923
[14:57:53] 954
[14:57:54] 928
[14:57:55] 912
[14:57:55] 907
[14:57:56] 915
[14:57:56] Average: 930.40
Interesting, this include without dirty bloated code is faster than SickAttack's include. Moreover, I haven't added any performance improvement code to the callbacks so in principle SmartCMD is more faster than the timings shown in this test.

Last edited by Yashas; 24/10/2016 at 04:51 PM.
Yashas is offline   Reply With Quote
Old 24/10/2016, 03:31 PM   #28
CantBeJohn
Big Clucker
 
CantBeJohn's Avatar
 
Join Date: Oct 2016
Posts: 87
Reputation: 15
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

Quote:
Originally Posted by Yashas View Post
Test code for SickAttack's include: http://pastebin.com/EJR7y49A

Results:


SmartCMD test code: http://pastebin.com/ZWxA6p6a

Results:
[14:57:48] 933
[14:57:49] 939
[14:57:50] 951
[14:57:51] 942
[14:57:52] 923
[14:57:53] 954
[14:57:54] 928
[14:57:55] 912
[14:57:55] 907
[14:57:56] 915
[14:57:56] Average: 930.40

Interesting, this include without dirty bloated code is faster than SickAttack's include. Moreover, I haven't added any performance improvement code to the callbacks so in principle SmartCMD is more faster than the timings shown in this test.
Nice, not sure if I was clear enough in my other post but I was going to switch over to this regardless if SickAttack's was faster or not. This just looks really nice and I see some useful stuff I can use.
CantBeJohn is offline   Reply With Quote
Old 24/10/2016, 08:14 PM   #29
SickAttack
Godfather
 
Join Date: Dec 2013
Posts: 5,113
Reputation: 754
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

It is actually a tad slower in a way:
Code:
[Without Callbacks]

This Include:

644
649
640
649
650

Command Processor:

605
604
606
608
609

[With Callbacks]

This Include:

660
662
671
672
660

Command Processor:

644
637
645
635
640

Go to the other command processor's thread for the code used here.
I don't really have time to add tons of features like you did here (it's pretty sick, I give you that! +8 rep!), but for the time being, I see no need if it can top off others in a way.
SickAttack is offline   Reply With Quote
Old 24/10/2016, 08:46 PM   #30
PrO.GameR
Gangsta
 
PrO.GameR's Avatar
 
Join Date: Oct 2012
Posts: 731
Reputation: 121
Default Re: Smart Command Processor (Scripter-friendly, feature rich and fast) (aka iZCMD+)

I don't know why are you obssessed with speed, imagine this situation:

Your server has 1000/1000 players, all your players have 10 ms ping (which is almost super improbable), now your command processors process 100,000 in 600ms, that means 1000 of them (everyone entering a CMD at same time) take roughly 6 ms, thats still less than the player's response time, Why don't you focus on what the community lacks instead of what we have and are satisfied with?
__________________
Blueberry Prison Roleplay will be back soon!
Follow the forums for more information about opening day.

Forums
PrO.GameR is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] eXtended INI Processor - Fast & Feature Rich INI Processor Yashas Includes 28 01/09/2015 07:45 PM
[Include] r_commands - Clear and fast command processor! Swimor Includes 33 04/01/2013 03:30 PM
fast command processor [mad]MLK Help Archive 1 22/08/2009 01:32 AM


All times are GMT. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.