Compressing gitlab assets

We are currently compressing assets with gzip in gitlab:

  1. CSS related assets in sprockets (enabled per default I believe: https://guides.rubyonrails.org/asset_pipeline.html#gzipping-your-assets),
  2. JS related assets in webpack

@mikegreiling raised this in a discussion we had and we wondered whether it makes sense to compress the assets in the gitlab-org/gitlab pipelines:

  1. Do we even consume the compressed assets in omnibus, or do we recompress anyhow?
  2. If we do consume the compressed assets, would it make sense to move the compression to omnibus, because then settings could be fine-tuned here and if we e.g. want different gzip settings or even use something like brotli.

It would be interesting to investigate:

  1. How much time is spend on compressing in GitLab CI pipelines on gitlab-org/gitlab?
  2. How much larger would the asset image be without the compressed files (I assume it would just be smaller, as we hand over compressed and not-compressed assets in the image)
Edited by Lukas Eipert