2 Replies Latest reply on Dec 27, 2001 12:38 PM by adrian.brock

    MarshalledInvocation speed up

    marc.fleury

      The marshalled invocation (org.jboss.invocation.MarshalledInvocation) uses MarshalledObject on all fields in the payload.

      Task: bench this with various objects in the payload, get numbers. Replace the FIXME in there to have a test for java.lang.* so we don't MO the standard objects from the Java language. Since the point of the MO is to make sure that when an invocation reaches the stack we don't miss the classloader.

        • 1. Re: MarshalledInvocation speed up

          Hi,

          Here's some numbers from the testsuite. These are on
          the server only.

          Created Marshalled Objects: 13845
          Serialized Object Size: 3714065
          Annotated Objects: 8565
          Annotation Size: 3583350
          Annotation/Total: 49%

          get() Marshalled Objects: 20400Null Objects: 14
          Serialized Object Size: 5319696
          Annotated Objects: 7940
          Annotation Size: 3939511
          Annotation/Total: 42.5%
          There's lots of java.lang.* in there, some with
          quite large annotations.

          This part's from some other posts.

          I couldn't find ObjectOutputStreamWithClassLoader,
          but there's an ObjectInputStreamWithClassLoader in JBossMX.

          The plan is to replace MarshalledObject with
          am object stream with a classloader that
          downloads classes via a proxy unless they
          are available locally???

          I'm away over the next few days. I probably won't
          read your reply until later this week.

          Merry Christmas,
          Adrian

          • 2. Re: MarshalledInvocation speed up

            Hi,

            I applied the startsWith("java") test and ran the
            testsuite again, as well as some individual tests.

            There is no noticeable change in speed.
            Whatever change there is, is within the normal
            deviation of how long the tests take.

            But the marshalled object sizes only decreases by about 10%.

            The problem is the arguments are passed in an
            object java.lang.Object[] which still needs to be
            marshalled.

            This change could be more complicated, i.e. descend into the array and any java.util.Collection to only
            marshall non-jdk objects.

            But this is getting complicated and
            putting the cart before for horse. It would be
            far better to not marshall anything and get the client
            to ask for the classes it doesn't have using some
            other mechanism.

            Regards,
            Adrian