Skip to content

THE GENERATED POLICY FILE IS TOO DAMN BIG #1

Description

@bmeck

Even with some deduping it is large:

import * as ns from 'https://unpkg.com/d3?module';
console.log(ns);

Results in a 388kb uncompressed and pretty printed policy file. That file has 1664 redirects generally of sizable length in both specifier and resolved location. Likely some kind of change to Node core would be the biggest win or perhaps some out of band table so that the resolved locations do not actually need to be in the policy; E.G. instead of https_3A_2F_2Funpkg.com_2Fd3-array_402.11.0_2Fsrc_2Farray.js_3Fmodule.mjs style filenames a side table could be used and this could instead be an incrementing filename like 1.mjs which would save 68 bytes for each reference to that resolved entry for example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions