AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blockmaker action (https://forums.alliedmods.net/showthread.php?t=152673)

katna 03-12-2011 15:27

Blockmaker action
 
recently my server lags when the blockmaker mod is actived and i tried to detect why those lags happen, anyway my question is how can i check why the plugin lag the server. the host has no problem. Also i tried disabled all plugins except Blockmaker and it was still laggy. The ping is ok and goes up to 100-150 once in 20-30 seconds

infek 03-12-2011 16:07

Re: Blockmaker action
 
It could be that blockmaker contains alot of coding. Not just the actions.

wrecked_ 03-12-2011 16:10

Re: Blockmaker action
 
This is not the place for this type of thread, however you should try disabling blockmaker to see if the lag still happens when it's disabled.

Sylwester 03-12-2011 16:35

Re: Blockmaker action
 
Does it lag on every map with any amount of blocks? Does it lag if there are no blocks at all?

You could try to use amxx profiler if you can make it work on your server (it seems that it causes crash when used with some modules).

katna 03-13-2011 03:58

Re: Blockmaker action
 
Quote:

Originally Posted by wrecked_ (Post 1432230)
This is not the place for this type of thread, however you should try disabling blockmaker to see if the lag still happens when it's disabled.

No lags without blockmaker enabled.

Quote:

Originally Posted by Sylwester (Post 1432240)
Does it lag on every map with any amount of blocks? Does it lag if there are no blocks at all?

every map, with around 200+- blocks, or with high amount of players.

Quote:

Originally Posted by Sylwester (Post 1432240)
You could try to use amxx profiler if you can make it work on your server (it seems that it causes crash when used with some modules).

testing it right now, will post results.

EDIT:
Code:

date: Sun Mar 13 21:27:42 2011 map: de_nuke
type |                            name |      calls | time / min / max
-------------------------------------------------------------------
  n |                          isdigit |          1 | 0.000001 / 0.000001 / 0.000001
  n |                          contain |      3474 | 0.001430 / 0.000000 / 0.000055
  n |                          strlen |    1547815 | 0.666827 / 0.000000 / 0.003950
  n |                          replace |      3125 | 0.002688 / 0.000000 / 0.000854
  n |                  get_user_flags |        20 | 0.000010 / 0.000000 / 0.000001
  n |                    console_print |        16 | 0.000080 / 0.000001 / 0.000010
  n |                      str_to_num |    1478486 | 1.038237 / 0.000000 / 0.012298
  n |                    get_user_name |        578 | 0.000289 / 0.000000 / 0.000008
  n |                    is_user_alive |        248 | 0.000091 / 0.000000 / 0.000006
  n |                    get_localinfo |          2 | 0.000005 / 0.000002 / 0.000003
  n |                    create_entity |        592 | 0.009890 / 0.000002 / 0.004900
  n |                DispatchKeyValue |        52 | 0.000248 / 0.000001 / 0.000012
  n |                          format |        697 | 0.001528 / 0.000000 / 0.000397
  n |                    DispatchSpawn |        13 | 0.001046 / 0.000061 / 0.000109
  n |                entity_set_string |      1730 | 0.002778 / 0.000000 / 0.000985
  n |                      fake_touch |        13 | 0.007304 / 0.000460 / 0.000709
  n |                    remove_entity |        23 | 0.000157 / 0.000004 / 0.000015
  n |                  entity_set_int |    4532920 | 1.916207 / 0.000000 / 0.006676
  n |                entity_set_vector |      15476 | 0.014005 / 0.000000 / 0.000118
  n |                entity_set_float |    747967 | 0.410570 / 0.000000 / 0.003132
  n |                entity_get_vector |    3376077 | 1.481583 / 0.000000 / 0.005643
  n |                  precache_model |        132 | 0.151742 / 0.000002 / 0.015810
  n |                  precache_sound |          5 | 0.000008 / 0.000001 / 0.000004
  n |                  register_plugin |          1 | 0.000001 / 0.000001 / 0.000001
  n |                    register_cvar |          2 | 0.000014 / 0.000004 / 0.000010
  n |                  register_clcmd |        75 | 0.000497 / 0.000002 / 0.000016
  n |                  register_menuid |        12 | 0.000014 / 0.000000 / 0.000002
  n |                register_menucmd |        12 | 0.000016 / 0.000001 / 0.000002
  n |                      RegisterHam |          2 | 0.000029 / 0.000005 / 0.000024
  n |                register_forward |          1 | 0.000002 / 0.000002 / 0.000002
  n |                  register_think |          1 | 0.000003 / 0.000003 / 0.000003
  n |                  register_event |          2 | 0.000008 / 0.000004 / 0.000004
  n |                  get_user_msgid |          2 | 0.000004 / 0.000001 / 0.000003
  n |                register_message |          1 | 0.000001 / 0.000001 / 0.000001
  n |                  get_maxplayers |          6 | 0.000002 / 0.000000 / 0.000001
  n |                        formatex |        617 | 0.001657 / 0.000000 / 0.000016
  n |                              add |        324 | 0.000178 / 0.000000 / 0.000003
  n |                      dir_exists |          1 | 0.000009 / 0.000009 / 0.000009
  n |                      get_mapname |          1 | 0.000000 / 0.000000 / 0.000000
  n |                      get_user_ip |          1 | 0.000009 / 0.000009 / 0.000009
  n |                            equal |    7191331 | 2.760356 / 0.000000 / 0.008918
  n |                            fopen |          3 | 0.000194 / 0.000010 / 0.000165
  n |                            feof |        592 | 0.000248 / 0.000000 / 0.000002
  n |                            fgets |        590 | 0.048349 / 0.000000 / 0.046332
  n |                            parse |        590 | 0.001371 / 0.000000 / 0.000099
  n |                      file_exists |        33 | 0.000159 / 0.000002 / 0.000014
  n |                          fclose |          3 | 0.000116 / 0.000016 / 0.000072
  n |                    is_user_hltv |        20 | 0.000030 / 0.000001 / 0.000002
  n |                    is_valid_ent |    520824 | 0.235607 / 0.000000 / 0.001687
  n |                        floatdiv |      4641 | 0.001640 / 0.000000 / 0.000008
  n |                  set_user_noclip |        18 | 0.000022 / 0.000000 / 0.000002
  n |                set_user_godmode |          5 | 0.000008 / 0.000001 / 0.000002
  n |                          get_uc |    1169382 | 0.496856 / 0.000000 / 0.006747
  n |                  entity_get_int |    1306438 | 0.953237 / 0.000000 / 0.008829
  n |                  get_user_aiming |        125 | 0.016593 / 0.000009 / 0.000659
  n |                entity_get_string |    7197014 | 3.371628 / 0.000000 / 0.014771
  n |                          strcmp |        577 | 0.000270 / 0.000000 / 0.000004
  n |                    get_pcvar_num |        30 | 0.000018 / 0.000000 / 0.000001
  n |                  set_hudmessage |      2805 | 0.001820 / 0.000000 / 0.000006
  n |                  show_hudmessage |      2789 | 0.031129 / 0.000002 / 0.000056
  n |                        floatsub |    4510287 | 1.660715 / 0.000000 / 0.021853
  n |                        floatadd |    683772 | 0.280625 / 0.000000 / 0.003218
  n |                          engfunc |      11576 | 0.010550 / 0.000000 / 0.001049
  n |                              pev |    1558300 | 1.114545 / 0.000000 / 0.007362
  n |                          set_pev |      2294 | 0.007884 / 0.000000 / 0.005245
  n |                    str_to_float |      13864 | 0.011845 / 0.000000 / 0.000477
  n |                entity_get_edict |      50520 | 0.042350 / 0.000000 / 0.003437
  n |                get_user_godmode |        452 | 0.000359 / 0.000000 / 0.000003
  n |                find_ent_by_class |    3369894 | 23.021015 / 0.000000 / 0.010451
  n |              find_ent_in_sphere |  10092592 | 56.852003 / 0.000000 / 0.021829
  n |                    get_gametime |    4269996 | 1.595542 / 0.000000 / 0.006039
  n |                entity_get_float |    3366153 | 1.432956 / 0.000000 / 0.008525
  n |                set_user_gravity |        503 | 0.000434 / 0.000000 / 0.000007
  n |                      task_exists |      23320 | 0.125188 / 0.000000 / 0.000518
  n |                        set_task |      20162 | 0.074905 / 0.000001 / 0.000117
  n |                      remove_task |      15692 | 0.126150 / 0.000000 / 0.014275
  n |                  get_user_health |      2594 | 0.001464 / 0.000000 / 0.000009
  n |                hnsxp_get_user_hp |      6348 | 0.028860 / 0.000000 / 0.003632
  n |                              min |        86 | 0.000046 / 0.000000 / 0.000001
  n |                  set_user_health |        86 | 0.000082 / 0.000000 / 0.000002
  n |                    halflife_time |      2771 | 0.001281 / 0.000000 / 0.000005
  n |                      emit_sound |        10 | 0.000111 / 0.000005 / 0.000013
  n |                  velocity_by_aim |      1336 | 0.001488 / 0.000000 / 0.000015
  n |                        user_slap |        612 | 0.007725 / 0.000003 / 0.000040
  n |                cs_get_user_team |      1495 | 0.000679 / 0.000000 / 0.000006
  n |              set_user_rendering |        108 | 0.000104 / 0.000000 / 0.000002
  n |                cs_get_user_money |        10 | 0.000008 / 0.000000 / 0.000002
  n |                cs_set_user_money |        10 | 0.000100 / 0.000007 / 0.000017
  n |                    get_user_team |      1461 | 0.001048 / 0.000000 / 0.000013
  n |                  user_has_weapon |          6 | 0.000003 / 0.000000 / 0.000001
  n |                        give_item |          6 | 0.001234 / 0.000168 / 0.000215
  n |              cs_set_weapon_ammo |          4 | 0.000004 / 0.000001 / 0.000001
  n |                      client_cmd |          6 | 0.000053 / 0.000005 / 0.000019
  n |                        floatabs |        32 | 0.000016 / 0.000000 / 0.000001
  n |                  get_msg_arg_int |      13259 | 0.006921 / 0.000000 / 0.000010
  n |                  get_user_origin |      2599 | 0.109151 / 0.000000 / 0.002415
  n |                        show_menu |        160 | 0.001952 / 0.000001 / 0.000027
  n |                  get_distance_f |      1320 | 0.000723 / 0.000000 / 0.000005
  n |                        read_argv |          6 | 0.000004 / 0.000000 / 0.000001
  n |                get_pcvar_string |          3 | 0.000003 / 0.000001 / 0.000001
  n |                        show_motd |          3 | 0.000048 / 0.000013 / 0.000019
  n |                        floatmul |      5936 | 0.002884 / 0.000000 / 0.000611
  n |                entity_set_origin |      1867 | 0.014057 / 0.000000 / 0.003596
  n |                entity_set_model |        579 | 0.003977 / 0.000003 / 0.000053
  n |                  entity_set_size |        579 | 0.000626 / 0.000000 / 0.000005
  n |                            copy |        16 | 0.000006 / 0.000000 / 0.000001
  n |                  point_contents |        15 | 0.000093 / 0.000000 / 0.000041
  n |                    message_begin |    368236 | 0.441872 / 0.000000 / 0.009133
  n |                      write_byte |    2577580 | 1.152744 / 0.000000 / 0.007676
  n |                      write_coord |    1104672 | 0.573838 / 0.000000 / 0.012025
  n |                      message_end |    368236 | 3.020873 / 0.000000 / 0.012265
  n |                      trace_line |      7812 | 0.087884 / 0.000001 / 0.001968
  n |                            fputs |        561 | 0.000900 / 0.000000 / 0.000280
  n |                    entity_count |          3 | 0.000011 / 0.000003 / 0.000004
  n |                  get_user_weapon |        443 | 0.000213 / 0.000000 / 0.000002
  n |                  get_playersnum |        12 | 0.000008 / 0.000000 / 0.000001
  n |                          vformat |        12 | 0.000013 / 0.000001 / 0.000002
  n |                    write_string |        12 | 0.000020 / 0.000000 / 0.000003
  n |                is_user_connected |          5 | 0.000001 / 0.000000 / 0.000001
  p |                          CmdGrab |        10 | 0.000042 / 0.000003 / 0.000005
  p |                      CmdMainMenu |        20 | 0.000031 / 0.000000 / 0.000003
  p |                      CmdRelease |        18 | 0.000057 / 0.000001 / 0.000007
  p |                  EventCurWeapon |      1067 | 0.001131 / 0.000000 / 0.000008
  p |                    EventNewRound |        21 | 0.008619 / 0.000370 / 0.000633
  p |                      FwdCmdStart |    1169382 | 2.012801 / 0.000000 / 0.006248
  p |                  FwdPlayerKilled |        44 | 0.000085 / 0.000001 / 0.000003
  p |                  FwdPlayerSpawn |        123 | 0.000232 / 0.000000 / 0.000006
  p |                  HandleBlockMenu |        47 | 0.000102 / 0.000001 / 0.000004
  p |        HandleBlockSelectionMenu |        17 | 0.000034 / 0.000001 / 0.000003
  p |              HandleCommandsMenu |          6 | 0.000013 / 0.000001 / 0.000003
  p |            HandleLightColorsMenu |          5 | 0.000037 / 0.000007 / 0.000008
  p |                  HandleLightMenu |          4 | 0.000005 / 0.000001 / 0.000002


katna 03-13-2011 15:52

Re: Blockmaker action
 
Code:

  p |        HandleLightPropertiesMenu |          7 | 0.000028 / 0.000002 / 0.000010
  p |                  HandleMainMenu |        60 | 0.000123 / 0.000001 / 0.000011
  p |                HandleOptionsMenu |          2 | 0.000005 / 0.000002 / 0.000003
  p |            HandlePropertiesMenu |          5 | 0.000023 / 0.000001 / 0.000007
  p |                      LightThink |    368224 | 3.838171 / 0.000000 / 0.012483
  p |                  MsgStatusValue |      9775 | 0.013213 / 0.000000 / 0.000016
  p |                SetPropertyBlock |          3 | 0.000023 / 0.000006 / 0.000009
  p |                SetPropertyLight |          3 | 0.000012 / 0.000002 / 0.000008
  p |                  TaskNotInHoney |        388 | 0.000613 / 0.000001 / 0.000006
  p |                    TaskNotOnIce |        55 | 0.000102 / 0.000001 / 0.000003
  p |                        TaskSolid |      2012 | 0.008287 / 0.000000 / 0.000020
  p |                    TaskSolidNot |      1999 | 0.004648 / 0.000000 / 0.000013
  p |              TaskSpriteNextFrame |    370672 | 0.989231 / 0.000000 / 0.007533
  p |                client_PostThink |    1169382 | 0.884999 / 0.000000 / 0.010688
  p |                  client_PreThink |    1169382 | 5.050044 / 0.000000 / 0.010991
  p |                client_disconnect |        21 | 0.000024 / 0.000000 / 0.000002
  p |              client_putinserver |        20 | 0.000099 / 0.000003 / 0.000009
  p |                        pfn_touch |    260356 | 0.381671 / 0.000000 / 0.003448
  p |                      plugin_cfg |          1 | 0.000001 / 0.000001 / 0.000001
  p |                      plugin_init |          1 | 0.000038 / 0.000038 / 0.000038
  p |                  plugin_precache |          1 | 0.000148 / 0.000148 / 0.000148
  p |                    server_frame |    187185 | 18.319134 / 0.000053 / 0.021699
  f |            operator*(Float:,_:) |        13 | 0.000009 / 0.000000 / 0.000001
  f |            operator/(Float:,_:) |        504 | 0.000299 / 0.000000 / 0.000007
  f |            operator+(Float:,_:) |        16 | 0.000013 / 0.000000 / 0.000001
  f |            operator-(Float:,_:) |        30 | 0.000013 / 0.000000 / 0.000001
  f |        operator==(Float:,Float:) |      2989 | 0.001922 / 0.000000 / 0.000568
  f |            operator==(Float:,_:) |        388 | 0.000266 / 0.000000 / 0.000005
  f |        operator!=(Float:,Float:) |    2234474 | 0.896954 / 0.000000 / 0.006466
  f |        operator>(Float:,Float:) |      1012 | 0.000363 / 0.000000 / 0.000001
  f |        operator>=(Float:,Float:) |    7501534 | 2.947967 / 0.000000 / 0.008469
  f |            operator>=(Float:,_:) |    370672 | 0.136342 / 0.000000 / 0.003265
  f |        operator<(Float:,Float:) |    373475 | 0.139113 / 0.000000 / 0.001200
  f |            operator<=(Float:,_:) |          3 | 0.000003 / 0.000001 / 0.000001
  f |            operator<=(_:,Float:) |          3 | 0.000003 / 0.000001 / 0.000001
  f |                      is_str_num |          1 | 0.000001 / 0.000001 / 0.000001
  f |                      replace_all |        633 | 0.005489 / 0.000000 / 0.001585
  f |                        IVecFVec |      2589 | 0.001616 / 0.000000 / 0.000009
  f |                        FVecIVec |    368224 | 0.356742 / 0.000000 / 0.006845
  f |                          access |        20 | 0.000024 / 0.000000 / 0.000002
  f |                  get_configsdir |          1 | 0.000000 / 0.000000 / 0.000000
  f |                      get_datadir |          1 | 0.000003 / 0.000003 / 0.000003
  f |                      fakedamage |        13 | 0.000073 / 0.000003 / 0.000010
  f |                    set_rendering |      5676 | 0.012437 / 0.000000 / 0.000072
  f |              processBlockModels |          1 | 0.000295 / 0.000295 / 0.000295
  f |                  RegisterSayCmd |        21 | 0.000054 / 0.000001 / 0.000008
  f |                      CreateMenus |          1 | 0.000039 / 0.000039 / 0.000039
  f |              SetupBlockRendering |          2 | 0.000002 / 0.000001 / 0.000001
  f |                      ActionBhop |      2823 | 0.004485 / 0.000000 / 0.000013
  f |                      ActionHeal |      6348 | 0.013440 / 0.000000 / 0.000016
  f |                        ActionIce |        912 | 0.001794 / 0.000000 / 0.000015
  f |                ActionTrampoline |      8034 | 0.020309 / 0.000000 / 0.000260
  f |                ActionSpeedBoost |      1336 | 0.004149 / 0.000000 / 0.000014
  f |                      ActionSlap |        612 | 0.000574 / 0.000000 / 0.000004
  f |                ActionLowGravity |        534 | 0.001301 / 0.000000 / 0.000143
  f |                      ActionHoney |      15217 | 0.033081 / 0.000000 / 0.000030
  f |                    ActionBarrier |        173 | 0.000344 / 0.000000 / 0.000005
  f |                ActionDelayedBhop |      2667 | 0.002734 / 0.000000 / 0.000017
  f |                      ActionMoney |      1322 | 0.004450 / 0.000000 / 0.000013
  f |                        ActionHe |      1035 | 0.003794 / 0.000000 / 0.000033
  f |                    ActionDeagle |        414 | 0.001367 / 0.000000 / 0.000010
  f |                  ActionTeleport |        32 | 0.000171 / 0.000002 / 0.000012
  f |                    TaskSolidNot |        13 | 0.000044 / 0.000002 / 0.000005
  f |                      SetGrabbed |        10 | 0.000061 / 0.000002 / 0.000009
  f |                    ShowMainMenu |        60 | 0.000228 / 0.000002 / 0.000006
  f |                    ShowBlockMenu |        47 | 0.000204 / 0.000002 / 0.000007
  f |          ShowBlockSelectionMenu |        17 | 0.000192 / 0.000006 / 0.000019
  f |              ShowPropertiesMenu |          8 | 0.000082 / 0.000007 / 0.000013
  f |                    ShowLightMenu |          4 | 0.000015 / 0.000003 / 0.000005
  f |          ShowLightPropertiesMenu |          9 | 0.000038 / 0.000003 / 0.000006
  f |              ShowLightColorsMenu |          5 | 0.000014 / 0.000002 / 0.000004
  f |                  ShowOptionsMenu |          2 | 0.000009 / 0.000004 / 0.000005
  f |                ShowCommandsMenu |          8 | 0.000031 / 0.000001 / 0.000006
  f |                    ToggleNoclip |        18 | 0.000031 / 0.000001 / 0.000003
  f |                    ToggleGodmode |          4 | 0.000006 / 0.000001 / 0.000002
  f |                ToggleAllGodmode |          2 | 0.000013 / 0.000005 / 0.000008
  f |                      CmdShowInfo |          3 | 0.000107 / 0.000033 / 0.000039
  f |                MoveGrabbedEntity |      1288 | 0.014284 / 0.000001 / 0.001110
  f |                      MoveEntity |      1288 | 0.001999 / 0.000000 / 0.000113
  f |                CreateBlockAiming |        13 | 0.000056 / 0.000003 / 0.000007
  f |                      CreateBlock |        561 | 0.008778 / 0.000004 / 0.000403
  f |              ConvertBlockAiming |          1 | 0.000003 / 0.000003 / 0.000003
  f |                    ConvertBlock |          1 | 0.000007 / 0.000007 / 0.000007
  f |                DeleteBlockAiming |        12 | 0.000044 / 0.000001 / 0.000006
  f |                      DeleteBlock |        10 | 0.000010 / 0.000000 / 0.000003
  f |                  ChangeBlockSize |          1 | 0.000001 / 0.000001 / 0.000001
  f |        SetPropertiesBlockAiming |          2 | 0.000009 / 0.000004 / 0.000005
  f |                      GetProperty |    1545457 | 2.056612 / 0.000000 / 0.007793
  f |                      SetProperty |      2271 | 0.005207 / 0.000000 / 0.001455
  f |                      ClearGroup |        21 | 0.000030 / 0.000000 / 0.000003
  f |                SetBlockRendering |      3679 | 0.005395 / 0.000000 / 0.000557
  f |          setBlockModelNameLarge |        171 | 0.000179 / 0.000000 / 0.000006
  f |          setBlockModelNameSmall |        38 | 0.000061 / 0.000000 / 0.000004
  f |            setBlockModelNamePole |        75 | 0.000195 / 0.000000 / 0.000110
  f |                          IsBlock |    142890 | 0.219367 / 0.000000 / 0.003003
  f |                        IsSpecial |        584 | 0.000273 / 0.000000 / 0.000010
  f |                  IsBlockInGroup |      1345 | 0.001890 / 0.000000 / 0.000008
  f |                    IsBlockStuck |        11 | 0.000088 / 0.000005 / 0.000013
  f |                  CreateTeleport |        16 | 0.000092 / 0.000003 / 0.000015
  f |                      IsTeleport |        67 | 0.000106 / 0.000000 / 0.000004
  f |                      CreateLight |          2 | 0.000016 / 0.000005 / 0.000011
  f |        SetPropertiesLightAiming |          3 | 0.000005 / 0.000001 / 0.000003
  f |                          IsLight |        70 | 0.000092 / 0.000000 / 0.000003
  f |                      DoSnapping |      1302 | 0.018226 / 0.000005 / 0.000033
  f |                      SaveBlocks |          1 | 0.003077 / 0.003077 / 0.003077
  f |                      LoadBlocks |          1 | 0.005828 / 0.005828 / 0.005828
  f |                      IsStrFloat |          3 | 0.000002 / 0.000000 / 0.000002
  f |                      ResetPlayer |        108 | 0.000636 / 0.000001 / 0.000012
  f |                    ResetMaxspeed |        443 | 0.001033 / 0.000000 / 0.000007
  f |                            Print |        12 | 0.000046 / 0.000001 / 0.000006
  f |                ShowColorMessage |        12 | 0.000033 / 0.000002 / 0.000005
  f |                  ColorSelection |        12 | 0.000008 / 0.000000 / 0.000001
  f |                      FindPlayer |          2 | 0.000007 / 0.000003 / 0.000004
27 natives, 22 public callbacks, 104 function calls were not executed.

edit:damn this slow website, sorry for double and couldn't post, it was too long

Sylwester 03-13-2011 16:07

Re: Blockmaker action
 
Did you get those results while server was lagging?
Can you post source code of that blockmaker?

katna 03-13-2011 17:43

Re: Blockmaker action
 
well the server isn't lagging all the time,
mostly when the server is full.
Did you see something unusual with those results?

Sylwester 03-13-2011 18:52

Re: Blockmaker action
 
Not really, but you can easily tell what takes most time and what should be optimized.

katna 03-14-2011 02:27

Re: Blockmaker action
 
well from what i see, the most is : server frame, find_ent_by_class and find_ent_in_sphere which both find_ent_ are used in server_frame to detect teleport ( in necro bm too ). It might be the problem


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

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