Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-4279

tune space-time tradeoffs for internal array structures in core uima

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.7.0SDK
    • 2.8.0SDK
    • Core Java Framework
    • None

    Description

      Several internal array structures in UIMA expand like array lists by doubling, up to some size, usually 2 million entries, and then expand by adding that size (e.g., 2 million) instead of doubling.

      The switch-over point for most of these is 2 million entries. Increasing this makes (for large allocations > 2 million) for more wasted space, since, on average, about 1/2 of the last reallocation may be unused On the other hand, having a large allocation size increment means that fewer reallocations are needed (each one requires copying the entries from the old into the new, usually with System.arraycopy).

      Given the drop in memory cost, increase the reallocation switch-over limit for the 2 million entries to 16 million, to rebalance a bit more in favor of speed vs memory. Note this has no effect except when the size of these internal tables grows beyond 2 million entries.

      Attachments

        Issue Links

          Activity

            People

              schor Marshall Schor
              schor Marshall Schor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: