Skip to content
Snippets Groups Projects
  • Roeland Jago Douma's avatar
    ce10f8b8
    Only generate previews in powers of 4 and set min · ce10f8b8
    Roeland Jago Douma authored
    
    Before we'd round up all preview request to their nearest power of two.
    This resulted still in a lot of possible images. Generating a lot of
    server load and taking up a lot of space.
    
    This moves it to previews to be powers of 4: 64, 256, 1024 and 4096
    Also the first two powers are always skipped (4, 16) as it doesn't make
    sense to generate previews for that.
    
    We cache preview pretty agressively and I feel this is a better
    tradeoff.
    
    Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
    ce10f8b8
    History
    Only generate previews in powers of 4 and set min
    Roeland Jago Douma authored
    
    Before we'd round up all preview request to their nearest power of two.
    This resulted still in a lot of possible images. Generating a lot of
    server load and taking up a lot of space.
    
    This moves it to previews to be powers of 4: 64, 256, 1024 and 4096
    Also the first two powers are always skipped (4, 16) as it doesn't make
    sense to generate previews for that.
    
    We cache preview pretty agressively and I feel this is a better
    tradeoff.
    
    Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>