Skip to content

Slow WebP #305

@regs01

Description

@regs01

I tried WebP to store 256x256 thumbnails. But it appears to be almost 15 times slower than PNG. 1800 thumbnails takes additional 8 to 12 seconds on SaveToStreamAs(ThumbStream, ifPNG), but over 110-120 seconds with SaveToStreamAs(ThumbStream, ifWebP). I tried to compile most recent version of llbwebp, which made little fast to those 110-120 seconds. It was even longer with older library from here. Is there any way to play with WebP settings?

if ThumbBitmap = nil then
    ThumbBitmap := GetFileThumbnail(AFileName, AThumbWidth, AThumbHeight, BGRAPixelTransparent, True);

ThumbStream := TMemoryStream.Create;
try
  ...
  ThumbBitmap.SaveToStreamAs(ThumbStream, ifWebP);
  ...
finally
  ThumbStream.Free;
end;  

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions