Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Easy question [modified]

Easy question [modified]

Scheduled Pinned Locked Moved Visual Basic
question
8 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jarno Burger
    wrote on last edited by
    #1

    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

    M D 2 Replies Last reply
    0
    • J Jarno Burger

      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

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      huh ? what is the question ?

      This signature was proudly tested on animals.

      J L 2 Replies Last reply
      0
      • M Maximilien

        huh ? what is the question ?

        This signature was proudly tested on animals.

        J Offline
        J Offline
        Jarno Burger
        wrote on last edited by
        #3

        how is this possible , that raising event is as fast a calling the sub in the parent?

        Jarno Burger Video Jockey

        S 1 Reply Last reply
        0
        • J Jarno Burger

          how is this possible , that raising event is as fast a calling the sub in the parent?

          Jarno Burger Video Jockey

          S Offline
          S Offline
          Sebastian Schneider
          wrote on last edited by
          #4

          That is because it was written by someone who can't read. You.

          J 1 Reply Last reply
          0
          • J Jarno Burger

            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

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            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

            J 1 Reply Last reply
            0
            • S Sebastian Schneider

              That is because it was written by someone who can't read. You.

              J Offline
              J Offline
              Jarno Burger
              wrote on last edited by
              #6

              haha :laugh:

              Jarno Burger Video Jockey

              1 Reply Last reply
              0
              • D Dave Kreskowiak

                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

                J Offline
                J Offline
                Jarno Burger
                wrote on last edited by
                #7

                thats 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

                1 Reply Last reply
                0
                • M Maximilien

                  huh ? what is the question ?

                  This signature was proudly tested on animals.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  hey, i must say i am letting all my friends run crazy over this world that i am in at this present moment. Troy :laugh:

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups