WCF performance issues - weird slowdown -


i have video-processing engine i've written while ago, combination of c# , c++, processes video file on disk @ 10 frames per second... c# part of spawns threads, , c++ bits of instantiate reader , video processing routines… there 1 main thread created when main c# object created, , main thread spawns off c++-based reader thread , video processing threads. threading verifiably correct. there no blocking or deadlock issues in it. code is/was stable.

now, if wrap whole thing inside wcf service, , use wcf set file process, tell (the video engine) “go”, individual frames process @ same speed, except once in while, every few seconds, threads stall out while, they're being suspended. it's weird!! doesn't happen when don't run through wcf.

this has nothing wcf calls themselves, because make few initialization calls wcf service running, don’t call wcf longer!!! service “persession”, concurrencymode = multiple, what’s going on not multithreading (locking/blocking) issue. main wcf interface has “connect” method, , in it, create main c# “background” thread, , thread, create more c++ based threads.

i put timer around 1 of video processing routines calls opencv (seriously) takes 1/10th of second, , logged it. i’ll similar this:

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 2000ms <--- naughty! doesn't happen when running w/o wcf

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

time: 100ms

there nothing in particular makes frame take longer, should 100ms others. since timer around block of code deep-down opencv routine didn’t write, seems me “somehow”, thread or iis process being suspended, horked, lowered in priority, or stalled out, because else going on.

i’m wcf newbie, no dummy programming , multithreading. don't know in wcf, i'm pretty savvy enough use tools slowdowns, if knew for.

again: not frequency of wcf calls!!! call 3 methods let rip (by itself)!!! runs many minutes w/o incoming wcf call!


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -