Click
  1. Click
  2. CLK-305

Table control might allocate excessive memory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Click 1.3.1 / 1.4RC2

      Description

      Table#toString() allocate memory for HtmlStringBuffer.

      int bufferSize =
      (getColumnList().size() * 60) * (getRowList().size() + 1);

      However, when Table is paginated, Table control allocates excessive memory.
      I think if the page size is specified, the initial buffer size should be calculated by the page size:

      int bufferSize =
      (getColumnList().size() * 60) * (getPageSize() + 1);
      ^^^^^^^^^^^^^

      I'm using Table with large rows. So sometimes, it causes OutOfMemory by this issue.

        Activity

        Hide
        Naoki Takezoe added a comment -

        Hi Malcolm,
        Thanks for your quick work!

        Show
        Naoki Takezoe added a comment - Hi Malcolm, Thanks for your quick work!
        Hide
        Malcolm Edgar added a comment -

        Hi Naoki,

        thanks for raising this could you please verify the fix checked in.

        thanks Malcolm Edgar

        Show
        Malcolm Edgar added a comment - Hi Naoki, thanks for raising this could you please verify the fix checked in. thanks Malcolm Edgar

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Naoki Takezoe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development