Redocly / Redocly/redoc

Nested recursion leads to Out of Memory Exceptions in the browser

Open
#2,184 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug
Nested recursion leads to long load time, heavy memory consumption and possible Out of Memory Exceptions in the browser.
This happens since v2.0.0-rc.74.

Expected behavior
The load time and memory consumption shouldn't be affected that much, when working with "nested recursion objects" or behaviour should be reverted to rc.72.

Minimal reproducible OpenAPI snippet(if possible)
I attached a much minimized but still complex API in the attachments to reproduce the error which leads to out of memory. The original spec has even more recursions.

content-maker_simplified.zip

Contributor guide

Open the 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.

Research direction

Start with the attached content-maker_simplified.zip and reproduce the nested-recursion behavior in the browser using v2.0.0-rc.74, then compare it with rc.72. Done means the minimized OpenAPI example no longer causes excessive load time or memory consumption leading to an Out of Memory exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.