stevedlawrence opened a new pull request #739:
URL: https://github.com/apache/daffodil/pull/739


   Commit 4cc0863e71 modified the TDML compile result cache to use a
   WeakHashMap. While this worked in some cases, it relied on the garbage
   collector not being too aggressive. If the garbage collector
   aggressively cleans up our WeakHashMap entries, or something like an IDE
   frequently causes the GC to be run in between tests, it becomes
   difficult to share compiled results between different DFDL Test Suites.
   This leads to excessive schema compilation.
   
   To fix this, this modifies to global TDML cache to be a normal HashMap,
   with expiration times stored with each compile result entry. When a DFDL
   Test suite finishes, it marks the compile results it uses with an
   expiration time. Entries are removed form this cache when the expire
   time is reached.
   
   To minimize the size of this global cache, we also only store
   non-embedded schemas in it. Embedded schemas cannot be shared between
   different TDML files/DFDL Test suites, so putting them in the global
   cache is unnecessary. Instead, compile results for embedded schemas are
   stored in a cache local to the DFDL Test Suite. They will be garbage
   collected when the DFDL Test Suite is garbage collected.
   
   DAFFODIL-2627


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to