Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

fix(memoryLeak): disable cache for transitjs #993

Merged
merged 4 commits into from
May 16, 2023
Merged

Conversation

Matthew-Mallimo
Copy link
Member

@Matthew-Mallimo Matthew-Mallimo commented May 9, 2023

Description

We noticed a memory leak happening where if non-immutable data was put into the store, transit-js would cache all the keys for that non-immutable data. This cache persisted across calls, and would grow indefinitely.

The solution is to use transit-js directly, and disable the cache. unfortunately transit-immutable-js does not allow you to pass options to transit-js, so we have to add handles manually.

Motivation and Context

memory leaks are bad

How Has This Been Tested?

Tested independently and unit tested

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (adding or updating documentation)
  • Dependency update
  • Security update

Checklist:

  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • These changes should be applied to a maintenance branch.
  • This change requires cross browser checks.
  • Performance tests should be ran against the server prior to merging.
  • This change impacts caching for client browsers.
  • This change impacts HTTP headers.
  • This change adds additional environment variable requirements for One App users.
  • I have added the Apache 2.0 license header to any new files created.

What is the Impact to Developers Using One App?

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

Size Change: +354 B (0%)

Total Size: 687 kB

Filename Size Change
./build/app/app.js 164 kB +354 B (0%)
ℹ️ View Unchanged
Filename Size
./build/app/app~vendors.js 389 kB
./build/app/runtime.js 7.07 kB
./build/app/service-worker-client.js 7.26 kB
./build/app/vendors.js 120 kB

compressed-size-action

@Matthew-Mallimo Matthew-Mallimo requested review from code-forger and a team May 10, 2023 14:21
@Matthew-Mallimo Matthew-Mallimo marked this pull request as draft May 15, 2023 15:31
@Matthew-Mallimo Matthew-Mallimo marked this pull request as ready for review May 16, 2023 13:46
@JAdshead JAdshead enabled auto-merge (squash) May 16, 2023 15:05
@JAdshead JAdshead merged commit bb83c07 into main May 16, 2023
7 checks passed
@JAdshead JAdshead deleted the fix/memoryLeakv6 branch May 16, 2023 15:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants