Skip to content

Improve JSON API for Install Performance Improvements #19204

Open
0 of 2 issues completed
Open
@Rylan12

Description

@Rylan12

Verification

Provide a detailed description of the proposed feature

The formula.json and cask.json files are downloaded almost every time an install or upgrade happens, and these files are large.

  • Shard the JSON files
  • Create a new JSON API that contains the minimum information required to download a bottle's manifest file (name, version, hash)
  • Store formula API information in the bottle manifest file
  • When installing a formula, use the new lightweight API and retrieve all missing information needed from the manifest
  • When installing a cask, use the new lightweight API to check whether a new version is needed, and then retrieve the remaining info from the cask's individual JSON file and/or the Ruby file
    • Include a marker in the JSON for whether the ruby file is needed or not
  • Move tap migrations and other similar config files to live here in a single JSON file
  • Create a new JSON API file to store formula/cask descriptions that’s downloaded on-demand for brew info or brew search --desc —-eval-all

What is the motivation for the feature?

To make installing formulae and casks via the API faster

How will the feature be relevant to at least 90% of Homebrew users?

Increased performance for all API installs

What alternatives to the feature have been considered?

  • Use a git repo with just the JSON files for each comparison (and since there are only 2 files it shouldn't have the issues we had with homebrew/core)
  • Using BSON and Webpack but they are (including when gzip compressed) larger than gzip compressed JSON

Sub-issues

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions