Search found 6 matches
- 12 Nov 2012, 02:20
- Forum: SFS2X C# API
- Topic: Unity Editor freezes everytime when connect to server.
- Replies: 10
- Views: 20949
Re: Unity Editor freezes everytime when connect to server.
I have exactly the same issue, even without MonoDevelop debugging. I guess it may have nothing to do with connect. Perhaps something is not closed properly when you stop the scene. I tried disconnect upon the application quit callback. Doesn't help.
- 10 Nov 2012, 15:51
- Forum: SFS2X C# API
- Topic: Regex.Replace takes 100 ms in SmartFox.Send
- Replies: 6
- Views: 9523
Re: Regex.Replace takes 100 ms in SmartFox.Send
It's running in the Unity Editor, on a pretty much cutting edge PC with i7 cpu. Yes, it happens all the time. In the Unity Profiler, It shows big spikes on the frames where SmartFox.Send is called. I've tried making the strings shorter, and send fewer times, but it just doesn't seem to meet a real t...
- 08 Nov 2012, 14:51
- Forum: SFS2X C# API
- Topic: Regex.Replace takes 100 ms in SmartFox.Send
- Replies: 6
- Views: 9523
Re: Regex.Replace takes 100 ms in SmartFox.Send
Thanks Lapo. I'm totally aware of this. That's why I said " script CPU time", meaning the CPU time spent on script. Within this time, the call of SmartFox.Send takes 90%, and it take 100 ms (I know when profiling, code takes longer time, but 100 ms is still too much). And actually it makes...
- 08 Nov 2012, 06:41
- Forum: SFS2X C# API
- Topic: Regex.Replace takes 100 ms in SmartFox.Send
- Replies: 6
- Views: 9523
Regex.Replace takes 100 ms in SmartFox.Send
Hi, In my test project, the Unity Profiler shows that Regex.Place called inside SmartFox.Send takes about 100ms, which sums up to about 90% of the script CPU time each frame. Is there any way to get around this expensive use of Regex? Thanks. Some details: - The call stack shown in the Unity Profile...
- 08 Nov 2012, 06:18
- Forum: SFS2X C# API
- Topic: Performace Hit of SmartFox.Send()
- Replies: 3
- Views: 6879
Re: Performace Hit of SmartFox.Send()
Thanks. It helps.I find the performance hit actually comes from the Regex inside the Send function. I'll start another thread.
- 05 Nov 2012, 15:03
- Forum: SFS2X C# API
- Topic: Performace Hit of SmartFox.Send()
- Replies: 3
- Views: 6879
Performace Hit of SmartFox.Send()
Hello, I'm new to both SmartFoxServer and Unity. I have an array of some objects. Each frame I want to broadcast to other clients some information about the objects. My code looks like this. foreach(KeyValuePair<string, MyGameObject> entry in objects) { MyGameObject obj = entry.Value; transferObject...