Easy question [modified]
-
I am confused , I am delevering thousands of video frames from different movies to my main program. -BaseClass : 'papa' , handles frames -Has got a declared class : 'baby' , produces frames First it thought of raising a event in baby when a new frame arrived. Papa class could have a handler to handle the frames. But then it thought : events use a messageque somewhere , mayb no good idea. Secondly , i thought of calling parent.dowork sub in baby class. But when i wrote a test project, parent.dowork is a = only 1 % faster. raise event : 10138 papa.dostuff : 10067 raise event : 10123 papa.dostuff : 10171 raise event : 10154 papa.dostuff : 10143 raise event : 10338 papa.dostuff : 10264 raise event : 10204 papa.dostuff : 10799 raise event : 10729 papa.dostuff : 10720 raise event : 10579 papa.dostuff : 10156 raise event : 10181 papa.dostuff : 10285 raise event : 10918 papa.dostuff : 10752 raise event : 10377 papa.dostuff : 10317 ?????? HUH ???????
Jarno Burger Video Jockey
modified on Sunday, May 17, 2009 9:04 AM
-
I am confused , I am delevering thousands of video frames from different movies to my main program. -BaseClass : 'papa' , handles frames -Has got a declared class : 'baby' , produces frames First it thought of raising a event in baby when a new frame arrived. Papa class could have a handler to handle the frames. But then it thought : events use a messageque somewhere , mayb no good idea. Secondly , i thought of calling parent.dowork sub in baby class. But when i wrote a test project, parent.dowork is a = only 1 % faster. raise event : 10138 papa.dostuff : 10067 raise event : 10123 papa.dostuff : 10171 raise event : 10154 papa.dostuff : 10143 raise event : 10338 papa.dostuff : 10264 raise event : 10204 papa.dostuff : 10799 raise event : 10729 papa.dostuff : 10720 raise event : 10579 papa.dostuff : 10156 raise event : 10181 papa.dostuff : 10285 raise event : 10918 papa.dostuff : 10752 raise event : 10377 papa.dostuff : 10317 ?????? HUH ???????
Jarno Burger Video Jockey
modified on Sunday, May 17, 2009 9:04 AM
huh ? what is the question ?
This signature was proudly tested on animals.
-
huh ? what is the question ?
This signature was proudly tested on animals.
how is this possible , that raising event is as fast a calling the sub in the parent?
Jarno Burger Video Jockey
-
how is this possible , that raising event is as fast a calling the sub in the parent?
Jarno Burger Video Jockey
That is because it was written by someone who can't read. You.
-
I am confused , I am delevering thousands of video frames from different movies to my main program. -BaseClass : 'papa' , handles frames -Has got a declared class : 'baby' , produces frames First it thought of raising a event in baby when a new frame arrived. Papa class could have a handler to handle the frames. But then it thought : events use a messageque somewhere , mayb no good idea. Secondly , i thought of calling parent.dowork sub in baby class. But when i wrote a test project, parent.dowork is a = only 1 % faster. raise event : 10138 papa.dostuff : 10067 raise event : 10123 papa.dostuff : 10171 raise event : 10154 papa.dostuff : 10143 raise event : 10338 papa.dostuff : 10264 raise event : 10204 papa.dostuff : 10799 raise event : 10729 papa.dostuff : 10720 raise event : 10579 papa.dostuff : 10156 raise event : 10181 papa.dostuff : 10285 raise event : 10918 papa.dostuff : 10752 raise event : 10377 papa.dostuff : 10317 ?????? HUH ???????
Jarno Burger Video Jockey
modified on Sunday, May 17, 2009 9:04 AM
There wouldn't be that much of a difference. I guess you were thinking that messages sit around in the message pump for a few seconds before they're processed?? Not true... Having the child directly call a method in the parent class in not a good idea, unless you're using delegates and Invoking. The child should never be tied directly to another class.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
That is because it was written by someone who can't read. You.
haha :laugh:
Jarno Burger Video Jockey
-
There wouldn't be that much of a difference. I guess you were thinking that messages sit around in the message pump for a few seconds before they're processed?? Not true... Having the child directly call a method in the parent class in not a good idea, unless you're using delegates and Invoking. The child should never be tied directly to another class.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008thats cool to know for sure. i was always doubting that. thats why i qualified my question as a easy one. thnx.:thumbsup:
Jarno Burger Video Jockey
-
huh ? what is the question ?
This signature was proudly tested on animals.