wp7推送的性能问题

某天客户问我,使用push server推送的话,每天推几次,需要什么配置的server多少台。

问得我哑口无言,赶紧回去调查一下。结果还真有点出乎意料。

 

我用单线程顺序推送20次的话,20次总共花掉17~18S。

如果用多线程来同时推送的话,20次也要花掉11~12S。

我的电脑是2核Duo E8400@3.0G,4G内存。平均每次推送的开销在0.9秒。

注:根据下面的log我猜多线程的初始化开销在4,5秒。。每次推送的时间小于1秒。

以为我的cpu是双核的,所以1秒内能推送2~3回。

 

单线程的log

Start:18:46:55
end:18:47:12

 

多线程的log

 

start:9:36:40(主线程开始)
endcall:9:36:41(main thread end)(主线程结束)
end:9:36:45()
The thread '<No Name>' (0x128c) has exited with code 0 (0x0).
end:9:36:45
The thread '<No Name>' (0x123c) has exited with code 0 (0x0).
end:9:36:46
The thread '<No Name>' (0x1220) has exited with code 0 (0x0).
end:9:36:46
The thread '<No Name>' (0x132c) has exited with code 0 (0x0).
end:9:36:46
The thread '<No Name>' (0x109c) has exited with code 0 (0x0).
end:9:36:47
The thread '<No Name>' (0xb2c) has exited with code 0 (0x0).
end:9:36:47
The thread '<No Name>' (0x2ac) has exited with code 0 (0x0).
end:9:36:47
The thread '<No Name>' (0xd68) has exited with code 0 (0x0).
end:9:36:48
The thread '<No Name>' (0x1174) has exited with code 0 (0x0).
end:9:36:48
The thread '<No Name>' (0xc84) has exited with code 0 (0x0).
end:9:36:49
end:9:36:49
The thread '<No Name>' (0xb88) has exited with code 0 (0x0).
The thread '<No Name>' (0x1134) has exited with code 0 (0x0).
end:9:36:50
The thread '<No Name>' (0x11e8) has exited with code 0 (0x0).
end:9:36:50
The thread '<No Name>' (0x10d4) has exited with code 0 (0x0).
end:9:36:50
The thread '<No Name>' (0xfdc) has exited with code 0 (0x0).
end:9:36:50
The thread '<No Name>' (0x13f4) has exited with code 0 (0x0).
end:9:36:51
The thread '<No Name>' (0x1284) has exited with code 0 (0x0).
end:9:36:51
The thread '<No Name>' (0xa30) has exited with code 0 (0x0).
end:9:36:52
The thread '<No Name>' (0xa3c) has exited with code 0 (0x0).
end:9:36:52
The thread '<No Name>' (0xacc) has exited with code 0 (0x0).
The thread '<No Name>' (0xec8) has exited with code 0 (0x0).
The thread '<No Name>' (0x9f0) has exited with code 0 (0x0).

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值