Skip to content

Destroy TabularData in RecordSelector, TablePage, and TableWidget to prevent Memory leaks #1835

@pavish

Description

@pavish

Description

  • There are a lot of places (eg.,RecordSelector, TablePage, and TableWidget) where TabularData object is created reactively, like this:
    $: tabularData = new TabularData({
     id: table.id,
     abstractTypesMap,
     meta,
    });
    

This creates a new instance each time any of the arguments get updated, and is never destroyed, leading to memory leaks. Each TabularData instance should be destroyed before the next instance is created.

If possible, we should consider the following improvements:

  • The TabularData instance creation is costly and should be kept to a minimum, if possible it should not be made reactive.
  • We should update a TabularData's property instead of recreating if it is possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    readyReady for implementationrestricted: maintainersOnly maintainers can resolve this issuetype: bugwork: frontendRelated to frontend code in the mathesar_ui directory

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions