Skip to content

Add extra flags for Twig output minimization/validation #179

@DiegoPino

Description

@DiegoPino

What?

Twig has some useful space control function https://symfony.com/blog/better-white-space-control-in-twig-templates
but sometimes we want to go the extra mile and totally compress the output. Reason is: Very large JSONs (e.g Finding AIDs) that generate XML can vary from 1.5 Mbytes to 275Mbytes for the same data, different spacing. This not only affects download but also caching forcing us to allow larger packages on MYSQL and affecting performance deeply.

This issue needs to cover the following things
Documentation that explains to users that Space Control is a thing. I'm a bit worried about how much our users are really Twig templating themselves tbh so docs need to be clear

  • Extra flags on the Metadata Exposed Endpoints. One for Compression (maybe different mechanisms depending on the output format?) and one for Validation.
  • Extra flags on the Metadata display Formatter. One for Compression (maybe different mechanisms depending on the output format?) and one for Validation.

@patdunlavey @alliomeria @aksm @giancarlobi thoughts?

Metadata

Metadata

Assignees

Labels

Field FormatterThe thing that glues the pieces and adds glitterTwigTwig template processingenhancementNew feature or requestmetadataMeta(l) data

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions