How to evaluate garbage collection peformance (when it occur, how long taking ..etc)

5ae66ba6-c43e-49c4-a8e7-5a86acfe4d8c

    Dear user in community.

     

    I'm beginner to use JavaCardOS - 3.0.4.

    I'm struggling with peformance down, overhead effected by Garbage collection.

     

    I want to evaluate it more efficiently ex) when it occur, how long taking ..etc

     

    are there any applet to evaluate the GC peformance or any test applet like CTS ?

     

    Any infomation, help highly appreciate.

     

    thanks.

      • 1. Re: How to evaluate garbage collection peformance (when it occur, how long taking ..etc)
        owlstead

        I think it is next to impossible to measure the performance of the garbage collector without knowing the details of the implementation. Different implementations may show very different behavior given the state, and the exact state is hard to determine without at least knowing the architecture of the memory subsystem.

         

        Measuring the GC using just an Applet is of course non-sense, it doesn't normally have access to a stopwatch. It would only work with a combination of applet and PC side framework.

         

        Generally you should try and avoid GC at all times. Only request it or release references when absolutely required, preferably do not use it "in the field". Hopefully that tip will alleviate the need for GC performance comparisons.