Skip to content

fix expression vocab memory management and incorrect reallocation of aggregates storage#3175

Open
abalabin-bamfunds wants to merge 1 commit into
perspective-dev:masterfrom
abalabin-bamfunds:fix-expression-vocab-mem-2
Open

fix expression vocab memory management and incorrect reallocation of aggregates storage#3175
abalabin-bamfunds wants to merge 1 commit into
perspective-dev:masterfrom
abalabin-bamfunds:fix-expression-vocab-mem-2

Conversation

@abalabin-bamfunds
Copy link
Copy Markdown

also fix and add ability to create tables with index to the sys_info example

This PR fixes a problem when having a string-valued expression column on views of tables that frequently update made perspective grow unlimited amount of memory and slow down dramatically with time. While I could not get a test together that would show this clearly, the results of manual testing are below.

Using the updated sys_info example and the JSON pasted below for the "Generated Data" view the observations before the fix looked like this:
image
after the fix:
image

JSON:

{
  "version": "4.4.1",
  "columns_config": {},
  "plugin": "Datagrid",
  "plugin_config": {
    "columns": {},
    "scroll_lock": false,
    "edit_mode": "READ_ONLY"
  },
  "settings": true,
  "table": "superstore_4",
  "theme": "Pro Light",
  "title": "Generated Data",
  "group_by": [
    "String 1"
  ],
  "split_by": [],
  "sort": [],
  "filter": [],
  "group_rollup_mode": "rollup",
  "expressions": {
    "S": "concat(\"String 1\", \"String 2\")"
  },
  "columns": [
    "S",
    "Float 2",
    "Float 3",
    "Float 4",
    "Integer 0",
    "Integer 1",
    "Datetime 4",
    "Boolean 0"
  ],
  "aggregates": {
    "Datetime 4": "dominant",
    "S": "any",
    "Boolean 0": "dominant"
  }
}

…aggregates storage

fix and improve the sys_info example

    Signed-off-by: Alexander Balabin <abalabin@bamfunds.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant