Skip to content

Swagger generate is using a very large amount of RAM #2649

@sodul

Description

@sodul

Problem statement

We have a swagger.json file that has grown to 2.2MB over time and now calling swagger generate is causing the process to use close to 4GB of RAM. Just over a year ago it was under 2GB. We have been allocating more RAM to our containers to mitigate the issue but we are concerns that the process seems to be using a lot more RAM than we would expect. The swagger validate command stays under 500MB and this is not a problem.

Unfortunately we cannot share our swagger.json file but were wondering if others experience the same problem and how to mitigate it.

Swagger specification

N/A

Steps to reproduce

swagger generate spec -o swagger.json

Environment

swagger version: v0.27.0
go version: 1.17.2
OS: Ubuntu 20.04 under Docker.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PerformanceRelated to resource usage and performance of go-swaggergenerator

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions