Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VDialog - Memory Leak with SSR #282

Open
SparkDragon opened this issue Oct 10, 2024 · 1 comment
Open

VDialog - Memory Leak with SSR #282

SparkDragon opened this issue Oct 10, 2024 · 1 comment

Comments

@SparkDragon
Copy link

SparkDragon commented Oct 10, 2024

Environment

  • Node : 20.9.0

Packages

  • nuxt: 3.13.2
  • vue: 3.5.11
  • vue-router: 4.4.5
  • vuetify-nuxt-module: 0.18.3
  • vuetify (as dependency of vuetify-nuxt-module): 3.7.2

Description

Using "v-dialog" component causes memory leaks with Nuxt SSR.

Reproduction case

  1. Create a new nuxt project: yarn dlx nuxi@latest init test
  2. Add vuetify-nuxt-module: yarn nuxi@latest module add vuetify-nuxt-module
  3. Edit app.vue content:
<template>
  <div>
    <NuxtRouteAnnouncer />
    <NuxtWelcome />
    <v-dialog v-model="open">
      Hello world!
    </v-dialog>
  </div>
</template>

<script setup lang="ts">
  const open = ref(true);
</script>
  1. Build the application: yarn build
  2. Run with inspector: node --expose-gc --inspect .output/server/index.mjs
  3. Go to http://localhost:3000 with Google Chrome
  4. Open dev console (F12)
  5. Click on the node icon "Open dedicated DevTools for Node.js" on the top of the DevTools
  6. Take a snapshot
  7. Reload the page multiple times (10 times in my case) and wait a moment to let Nuxt clear memory
  8. Take a snapshot and compare with previous one

The property "Object" went from 4 846 852 bytes to 7 564 180 bytes and I can see there are a lot of new "v-dialog" objects which are not deleted. The more I wait, the more there are new "v-dialog" in memory (even without refreshing the page).
After several minutes, it was more than 20 Mbytes.

Here is a screenshot of the snapshot.
image

I've created a new project to isolate the issue, but I encountered the same problem with a real app, and with other vuetify components.

Any idea ?

@dllpl
Copy link

dllpl commented Dec 16, 2024

I found the same problem

nuxt 3.13.2
vue 3.5.10
vuetify-nuxt-module 0.12.0
vuetify 3.7.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants