|
发表于 2012-10-15 11:19:04
|
显示全部楼层
本帖最后由 hyp7617 于 2012-10-15 11:24 编辑
在第一轮测试中,从运行记录查看得到:
1) plugin.records_eyepiece.php对mostfinished和mostrecords的统计计算和升级花费了很多时间(由于要更新1389 entries updated,总共花费了约8min),如下- [10/15,02:35:46] ***************[plugin.records_eyepiece.php]***************
- [10/15,02:35:46] >> Checking Database for required extensions...
- [10/15,02:35:46] + Found column `timezone` at table `players_extra`.
- [10/15,02:35:46] + Found column `displaywidgets` at table `players_extra`.
- [10/15,02:35:47] + Found column `mostfinished` at table `players_extra`.
- [10/15,02:35:47] + Found column `mostrecords` at table `players_extra`.
- [10/15,02:35:47] + Found column `roundpoints` at table `players_extra`.
- [10/15,02:35:47] + Found column `visits` at table `players_extra`.
- [10/15,02:35:47] + Found column `winningpayout` at table `players_extra`.
- [10/15,02:35:47] + Found index `Nation` at table `players`.
- [10/15,02:35:47] + Found index `Wins` at table `players`.
- [10/15,02:35:47] + Found index `UpdatedAt` at table `players`.
- [10/15,02:35:48] + Found index `Score` at table `rs_karma`.
- [10/15,02:35:48] + Found index `Score` at table `rs_times`.
- [10/15,02:35:48] >> Updating `mostfinished` counts for all Players...
- [10/15,02:35:48] >> Updating `mostrecords` counts for all Players...
- [10/15,02:43:21] + 1389 entries updated.
- [10/15,02:43:21] >> Finished.
- [10/15,02:43:21] ***********************************************************
- [10/15,02:43:32] << player 250 joined the game [hyp7617 : hyp7617$f00$w.$z$f00tm-inn : China : 59382 : 192.168.0.101]
- ######################################################################
复制代码 2) 阵列计算(Calculating ranks)也会消耗一部分时间,约为30s,如下- End Round
- End Challenge
- [10/15,02:43:36] [RASP] Calculating ranks...
- [10/15,02:44:26] [RASP] ...Done!
- [10/15,02:44:28] [Music] Setting next song to: http://tmnn.d3373.jit8.cn/music/I'm Gonna Getcha Good.mux
- Begin Challenge
- [10/15,02:44:38] [plugin.records_eyepiece.php] Register event "onCheckpoint" to enabled wanted Widgets.
- [10/15,02:44:38] track changed [undefined] >> [Mbobo34]
- [10/15,02:44:38] current record on Mbobo34 is 0:16.72 and held by 禄蠀纽蟽芦AE86
- Begin Round
- End Round
- End Challenge
- [10/15,02:44:42] [RASP] Calculating ranks...
- [10/15,02:45:37] [RASP] ...Done!
- [10/15,02:45:39] [Music] Setting next song to: http://tmnn.d3373.jit8.cn/music/zhong_guo_ren.mux
- Begin Challenge
- [10/15,02:45:46] track changed [Mbobo34] >> [Mbobo19]
- [10/15,02:45:46] current record on Mbobo19 is 0:15.13 and held by IRmalay
- Begin Round
复制代码 在电脑本地数据库测试没有这个问题,所以可以初步判断这是由于网络原因引起的。
第一轮,优化方案如下:
忽略 plugin.records_eyepiece.php对mostfinished和mostrecords的统计计算和升级,同时也可以减轻数据库通信负担。
对于阵列计算的延迟,由于时间较短,且不影响玩家play,暂且不做处理,待观察。 |
|