Raised This Month: $12 Target: $400
 3% 

Menu Problem


Post New Thread Reply   
 
Thread Tools Display Modes
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 07-12-2010 , 05:50   Re: Menu Problem
Reply With Quote #11

Quote:
Originally Posted by mysticssjgoku4 View Post
Proof > Opinion
Don't care who it is.
He's one of the best coders here. If he says it's better, you can be 100% sure it's better.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2010 , 07:16   Re: Menu Problem
Reply With Quote #12

Quote:
Originally Posted by mysticssjgoku4 View Post
Until I see proof num_to_str performs better I prefer formatex. Thank you.
PHP Code:
public plugin_init()
{
    
register_plugin("formatex vs num_to_str"VERSION"ConnorMcLeod")

    new 
iRandszNum[4]

    for(new 
ii<1000i++)
    {
        
iRand random(1000)
        
formatex(szNumcharsmax(szNum), "%d"iRand)
        
num_to_str(iRandszNumcharsmax(szNum))
    }
    
server_cmd("quit")

Code:
date: Mon Jul 12 13:12:00 2010 map: bkz_goldbhop
type |                             name |      calls | time / min / max
-------------------------------------------------------------------
   n |                  register_plugin |          1 | 0.000001 / 0.000001 / 0.000001
   n |                           random |       1000 | 0.000189 / 0.000000 / 0.000001
   n |                         formatex |       1000 | 0.000223 / 0.000000 / 0.000001
   n |                       num_to_str |       1000 | 0.000368 / 0.000000 / 0.000001
   n |                       server_cmd |          1 | 0.000003 / 0.000003 / 0.000003
   p |                      plugin_init |          1 | 0.000569 / 0.000569 / 0.000569
0 natives, 0 public callbacks, 1 function calls were not executed.
Let's stick with formatex


Quote:
Originally Posted by drekes View Post
If connor says it, that's proof enough for me
WOWLOL

I just thought that a specific native is better than a generic one, in that case i was wrong.
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 07-12-2010 at 07:18.
ConnorMcLeod is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 07-12-2010 , 07:23   Re: Menu Problem
Reply With Quote #13

WTF why num_to_str is so bad
__________________
xPaw is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-12-2010 , 13:52   Re: Menu Problem
Reply With Quote #14

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
public plugin_init()
{
    
register_plugin("formatex vs num_to_str"VERSION"ConnorMcLeod")

    new 
iRandszNum[4]

    for(new 
ii<1000i++)
    {
        
iRand random(1000)
        
formatex(szNumcharsmax(szNum), "%d"iRand)
        
num_to_str(iRandszNumcharsmax(szNum))
    }
    
server_cmd("quit")

Code:
date: Mon Jul 12 13:12:00 2010 map: bkz_goldbhop
type |                             name |      calls | time / min / max
-------------------------------------------------------------------
   n |                  register_plugin |          1 | 0.000001 / 0.000001 / 0.000001
   n |                           random |       1000 | 0.000189 / 0.000000 / 0.000001
   n |                         formatex |       1000 | 0.000223 / 0.000000 / 0.000001
   n |                       num_to_str |       1000 | 0.000368 / 0.000000 / 0.000001
   n |                       server_cmd |          1 | 0.000003 / 0.000003 / 0.000003
   p |                      plugin_init |          1 | 0.000569 / 0.000569 / 0.000569
0 natives, 0 public callbacks, 1 function calls were not executed.
Let's stick with formatex




WOWLOL

I just thought that a specific native is better than a generic one, in that case i was wrong.
Thanks
Curious as to how you generated the table? All these years I always wondered how to do that. >_>
I created so many plugins but I have majorly relied on "optimizations" basically suggested alternatives to keep the server load down on things I ahve created. But never really looked into finding out how to do performance charts.
__________________


Last edited by mysticssjgoku4; 07-12-2010 at 14:34.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2010 , 14:56   Re: Menu Problem
Reply With Quote #15

http://forums.alliedmods.net/showthread.php?t=67752
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-12-2010 , 17:26   Re: Menu Problem
Reply With Quote #16

Quote:
Originally Posted by mysticssjgoku4 View Post
Also wont let me show the menu without having options.
Without options? Doesn't sound like a menu to me.

Quote:
Originally Posted by mysticssjgoku4 View Post
What is the point of this new menu if I can't have a fully dynamic approach to everything? Perhaps it just was overlooked when they created it.
Where did you read that the "new menus" were "fully dynamic to be able to do everything"? That's a huge request.

Looks like you will just have to use the original menu method to only have text and a back button then.
__________________
fysiks is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-12-2010 , 17:45   Re: Menu Problem
Reply With Quote #17

new menus suck hard
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 07-12-2010 , 18:15   Re: Menu Problem
Reply With Quote #18

Quote:
Originally Posted by fysiks View Post
Without options? Doesn't sound like a menu to me.
I really don't care your opinionated views of what a menu should be. What I do care about is making things clean, functioning, and meet/exceeds people's expectations to make game play more unique and exciting.

Quote:
Originally Posted by fysiks View Post
Where did you read that the "new menus" were "fully dynamic to be able to do everything"? That's a huge request.

Looks like you will just have to use the original menu method to only have text and a back button then.
What I heard back when it came out a couple years ago was that it was the cream of the crop, and was much more efficient at handing paged listings (which it is), than the previous menu handler. When things are said to be a replacement, I expect them to be a full replacement, non-partial. I do understand how we can forget about things, or how some of us want to eliminate what seems to be non-practical use, but it does tend to be screwy with the flexibility and logistics of how some of us code or develop.

--------------
Conner:
Thanks for that link much obliged!!
I have this report from my plugin set that I believe to be coded the poorest.
What are good/bad execution times? Nothing I see is really too alarming.
Code:
date: Mon Jul 12 17:44:46 2010 map: ns_hera type |                             name |      calls | time / min / max -------------------------------------------------------------------    n |                         formatex |        243 | 0.000068 / 0.000000 / 0.000002    n |                       nvault_set |        322 | 0.000727 / 0.000001 / 0.000141    n |                     server_print |          3 | 0.000431 / 0.000128 / 0.000155    n |                  get_user_authid |         32 | 0.000015 / 0.000000 / 0.000002    n |                    get_user_name |         32 | 0.000008 / 0.000000 / 0.000000    n |                           equali |          2 | 0.000001 / 0.000000 / 0.000000    n |                           format |        307 | 0.000129 / 0.000000 / 0.000002    n |                            copyc |          8 | 0.000002 / 0.000000 / 0.000000    n |                           strlen |        231 | 0.000046 / 0.000000 / 0.000000    n |                  register_plugin |          1 | 0.000001 / 0.000001 / 0.000001    n |                      nvault_open |          4 | 0.002230 / 0.000003 / 0.002212    n |                   register_clcmd |          1 | 0.000016 / 0.000016 / 0.000016    n |                         set_task |         68 | 0.000135 / 0.000001 / 0.000007    n |                     nvault_close |          1 | 0.002080 / 0.002080 / 0.002080    n |                      TrieDestroy |          1 | 0.000000 / 0.000000 / 0.000000    n |                  NSA_Server_Type |          2 | 0.000006 / 0.000003 / 0.000003    n |                      remove_task |         64 | 0.000047 / 0.000000 / 0.000001    n |                     NSA_A_Status |         74 | 0.000190 / 0.000001 / 0.000011    n |                         NSA_Load |        163 | 0.001243 / 0.000006 / 0.000024    n |                is_user_connected |         32 | 0.000011 / 0.000000 / 0.000001    n |                      is_user_bot |         32 | 0.000013 / 0.000000 / 0.000002    n |                     client_print |          2 | 0.000005 / 0.000001 / 0.000004    n |                        read_args |          1 | 0.000000 / 0.000000 / 0.000000    n |                    remove_quotes |          1 | 0.000000 / 0.000000 / 0.000000    n |                            parse |          1 | 0.000001 / 0.000001 / 0.000001    n |                      task_exists |          1 | 0.000005 / 0.000005 / 0.000005    n |                      menu_create |          3 | 0.000023 / 0.000006 / 0.000009    n |                     menu_setprop |          3 | 0.000002 / 0.000000 / 0.000001    n |                     menu_display |          3 | 0.000078 / 0.000019 / 0.000034    n |                     menu_destroy |          3 | 0.000017 / 0.000004 / 0.000007    n |                    nvault_lookup |        293 | 0.000482 / 0.000001 / 0.000007    n |                       str_to_num |        246 | 0.000082 / 0.000000 / 0.000002    n |                     menu_additem |         32 | 0.000032 / 0.000001 / 0.000002    n |                menu_item_getinfo |          1 | 0.000001 / 0.000001 / 0.000001    n |                         containi |         87 | 0.000033 / 0.000000 / 0.000001    n |                              add |         36 | 0.000013 / 0.000000 / 0.000001    n |                   set_hudmessage |         30 | 0.000007 / 0.000000 / 0.000001    n |                  show_hudmessage |         30 | 0.000071 / 0.000001 / 0.000004    p |                client_authorized |         32 | 0.000083 / 0.000002 / 0.000003    p |               client_putinserver |         32 | 0.000022 / 0.000001 / 0.000001    p |                   help_menu_task |          1 | 0.000001 / 0.000001 / 0.000001    p |                     help_messege |         32 | 0.000035 / 0.000001 / 0.000002    p |                          load_as |         32 | 0.000086 / 0.000002 / 0.000005    p |            menu_a_chosen_handler |          1 | 0.000002 / 0.000002 / 0.000002    p |              menu_a_main_handler |          2 | 0.000012 / 0.000001 / 0.000011    p |                       plugin_end |          1 | 0.000002 / 0.000002 / 0.000002    p |                      plugin_init |          1 | 0.000002 / 0.000002 / 0.000002    p |                       say_handle |          1 | 0.000003 / 0.000003 / 0.000003    p |                         show_hud |         30 | 0.000044 / 0.000001 / 0.000002    p |                       update_hud |         12 | 0.000172 / 0.000013 / 0.000022    p |                    update_vaults |          1 | 0.000003 / 0.000003 / 0.000003    f |                        nvault_ns |          1 | 0.000034 / 0.000034 / 0.000034    f |                        nvault_co |          1 | 0.000036 / 0.000036 / 0.000036    f |                        nvault_sg |          1 | 0.000034 / 0.000034 / 0.000034    f |               update_steamid_var |         32 | 0.000019 / 0.000001 / 0.000001    f |                  update_name_var |         32 | 0.000026 / 0.000001 / 0.000001    f |               NSA_Server_to_text |          7 | 0.000004 / 0.000000 / 0.000001    f |                          explode |          4 | 0.000005 / 0.000001 / 0.000001    f |                        help_menu |          2 | 0.000004 / 0.000002 / 0.000002    f |                list_achievements |          6 | 0.000185 / 0.000022 / 0.000064    f |                       insert_gid |         30 | 0.000011 / 0.000000 / 0.000000    f |                       clear_gids |          2 | 0.000004 / 0.000002 / 0.000002 8 natives, 12 public callbacks, 18 function calls were not executed.
__________________


Last edited by mysticssjgoku4; 07-12-2010 at 18:49.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
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

Forum Jump


All times are GMT -4. The time now is 14:36.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode