Hello,
    After travelling, recovering from a cold, and catching up after the
above, I'm ready to tackle a couple more JMeter patches.  But I've got a
couple of questions before I put the finishing touches on the patches
and send them in.

    The goal of the first patch is to reduce the size of SampleResult
objects.  There are a couple of unused fields, and some other fields
which are sometimes used but take up a fair amount of memory even in
cases where they are not being used.  I would like to fix these to
reduce memory usage and improve the serialization of these objects.

1) The "map" and "mark" fields don't appear to be used at all.  I plan
to get rid of these completely.

2) "assertionResults", "subResults", and "files" can be used in some
cases, but not always.  Instead of instantiating these fields
immediately, I plan to use lazy instantiation to create the List/Set
objects only when they are actually needed.

3) If we use lazy instantiation for these fields, should the
corresponding "get" methods return null if the fields haven't been set?
 Or should they return an empty List/Set?  I would prefer null, but the
calling code has to be able to handle this.  I can make sure that any
calling code in JMeter will handle this properly, but this change could
break any user-written code that might rely on getting back a non-null
reference.  So maybe it would be better to return an empty List/Set for
now, and then next time we have a significant API change we can make
this change as well.

4) Today's SampleResult isn't thread-safe, so I assume my new
modifications don't have to be thread-safe either.  I haven't studied
the code enough to determine whether or not JMeter allows SampleResult
to be accessed concurrently by more than one thread.  My lazy
instantiation code will probably be less thread-safe than the existing
code, so it could possibly break something that works today.  I can make
it thread-safe if it needs to be, but I won't add the extra overhead if
it's not necessary.

    I think that's it.  If you have any questions, let me know. 
Otherwise, I should have a patch ready soon after I get a thumbs-up on
the above.

Jeremy
http://www.xirr.com/~jeremy_a


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to