Skip to content

Mass category change causes memory and CPU usage spikes, often leading to tab hang and crash #2650

@zdimension

Description

@zdimension

Describe the bug
Changing the category for a lot of operations, from the search page for example, causes the tab to eat up a ton of memory and CPU and the whole page slows down to a halt and often crashes.

To Reproduce
Steps to reproduce the behavior:

  1. Get a list of operations (e.g. search for something so you get more than, say, 20 or 30 operations in the results)
  2. Select one operation, click Select All, so all operations are selected
  3. Change the category

Expected behavior
It changes the category

Screenshots
image

It looks like when a "change category for N operations" job is sent to the server, the server processes it operation by operation, but every time an operation is updated remotely, the list of operations is re-created from scratch on the client, but somehow the old objects aren't GCed fast enough (so the RAM usage increases), and the re-creation of that list eats up the CPU.

Also, if after changing the category, I switch to the budget page (showing categories for the year) the same thing happens; for each operation that is updated (around 1 per second), the list is refreshed and the page is slowed down.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome 111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions