Severe memory leak in Linux

Open
#212 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
linux, react, typescript, vite

Research direction

Start with the vite.config.ts configuration and reproduce the memory growth on Fedora Linux 42 using react-router-devtools 5.0.6, comparing development runs with the devtools enabled and disabled. Use the reported Chrome or Firefox behavior to identify the leak; done means browsing no longer causes continued memory growth or a crash on Linux.

Written by the indexing model from the issue text.

Description

We recently adopted react-router-devtools in my team.

vite.config.ts

export default defineConfig({
  plugins: [
    process.env.NODE_ENV === "development" ? reactRouterDevTools() : undefined,
    tsconfigPaths({ root: "./", projects: ["tsconfig.json"] }),
    tailwindcss(),
    reactRouter()
  ],
  optimizeDeps: {
    exclude: ["google-auth-library", "gcp-metadata"],
  },
})

In development mode, only in Linux, browsing through my application leads to a rapid increase in memory use

Image Image

in both Chrome and Firefox. Running the application without react-router-devtools leads to no issue, and using react-router-devtools in MacOS also leads to no issue.

After minutes of not interacting with the page at all, it crashes.

Image

System

Fedora Linux 42 (Workstation Edition)

Packages

  • react-router-devtools 5.0.6
Dominant language
TypeScript
Stars
975
Forks
55
PR merge metrics
No merged PRs in 30d

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from code-forge-io/react-router-devtools

All issues in code-forge-io/react-router-devtools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.