SSR Memory leak
- Vorherrschende Sprache
- JavaScript
- Sterne
- 814
- Forks
- 37
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
I recently added this package in our project and I was told it's causing memory leak in our prod env.
After reading the code, it seems like it's the `sanitized` cache that's causing the problem.
```javascript
sanitized[s] = true;
```
Every generated html string(`s`) would be stored in this cache, and it seems to have caused our server run out of memory and keeps restarting.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Start by tracing the SSR path around the `sanitized[s] = true` assignment and inspect how generated HTML strings are retained. Reproduce rendering many distinct HTML strings while monitoring process memory. Done means the reported SSR memory growth is addressed and the package no longer causes the server to run out of memory.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- backend, performance
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 30/100