Project

General

Profile

Actions

Idea #20232

open

Don't de/serialize large container/request columns for simple list requests

Added by Brett Smith almost 2 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
API
Target version:
Start date:
Due date:
Story points:
-

Description

There are some fields of containers and container requests that can grow very large. Loading a lot of them can put a lot of strain on the RailsAPI server, because Rails wants to deserialize them coming out of the database, then re-serialize them in the response. Most definitely mounts and secret_mounts. In principle, this could apply to any user-controlled array or hash, like cmd or env.

For requests where we simply pass through these fields verbatim, this de/serialization roundtrip seems unnecessary. If the data is stored in JSON in the database, and we're going to send it as JSON to the client, and none of our code needs to query/filter/manipulate these fields, then it would be cool if we could just pass through the data directly from the database and have Rails treat it as opaque data for these purposes.

For grooming: Investigate whether there's a way to do this kind of pass-through in Rails, and what API calls we have that actually do merely pass through the data like this. Ideally benchmark how much this strategy reduces RAM and CPU use per request.

If it's doable and worthwhile, it seems like an optimization worth considering.

No data to display

Actions

Also available in: Atom PDF