Bug 167007 - GIF animation speed drops with Skia/Raster
Summary: GIF animation speed drops with Skia/Raster
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-13 19:54 UTC by Telesto
Modified: 2025-06-15 19:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Xcode Instruments Performance trace (26.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-06-13 19:55 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-06-13 19:54:55 UTC
Description:
GIF animation speed drops with spinning beachball 

Steps to Reproduce:
1. Open attachment 159163 [details]
2. Go to sheet 2. Drag the gif to some different spot
3. Switch to sheet 5
4. Minimize the Window
5. Restore the window by click LibreOffice icon in the dock
6. Drag the gif on sheet 5
7. Switch to sheet 2 and hoover over the gif

8. Switch back forward between 2 - 5 if there is no lag

Actual Results:
Massive slowdown; dialogs become slow

Expected Results:
Normal speed


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7fddf33f70b5e496ca7e3936a845d47b9deca027
CPU threads: 8; OS: macOS 14.7.4; UI render: Skia/Raster; VCL: osx
Locale: nl-NL (nl_NL.UTF-8); UI: en-US
Calc: threaded
Comment 1 Telesto 2025-06-13 19:55:16 UTC
Created attachment 201265 [details]
Xcode Instruments Performance trace
Comment 2 Jeremy Norvell 2025-06-14 20:35:56 UTC
Thank you for reporting the bug. I can confirm slowdown of the GIF animation is present in both versions of LibreOffice listed below.

Notable is that in v25.8, I don't get the beachball, I get the hand/glove icon but the slowdown is present and very noticable.

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 84da1f50ca8261129909901c2ff72adb9c67510a
CPU threads: 8; OS: macOS 15.2; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 8; OS: macOS 15.2; UI render: Skia/Raster; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Patrick (volunteer) 2025-06-15 15:38:01 UTC
I cannot reproduce this bug in my local master build on Mac Silicon. Maybe it is only limited to Mac Intel?:

Version: 26.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: a25172b81142df86b7c1854edbeb885d63bf0182
CPU threads: 8; OS: macOS 15.5; UI render: Skia/Raster; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded
Comment 4 Telesto 2025-06-15 19:06:20 UTC
Not specific to macOS

1. Open attachment 159163 [details]
2. Go to sheet 2
3. Copy the GIF
4. New Impress sheet (don't close the source)
5. Paste the GIF (2x)
6. Move on of the gives (to prevent to be stacked)
7. Press Play presentation.. Wait (frame drop does occur within 10 seconds).
8. If not press ESC.. Framedrop should occur now 

SideNote: I increased the ImageCacheSize to 512 MB on my Windows machine with low resolution screen
Comment 5 Telesto 2025-06-15 19:27:10 UTC
Argh, it's the swapOut

GraphicFilter::readGIF
GraphicFilter::ImportGraphic
GfxLink::LoadNative
ImpGraphic::swapOut
ImpGraphic::swapOut
ImpGraphic::getSwapFileStream


A) I increased the ImageCacheSize for Skia to 1024 MB, however keeps swapping
B) I increased the GraphicMemoryLimit from 300 MB to 1024, problem solved, even with ImageCacheSize set to 64 MB
Comment 6 Telesto 2025-06-15 19:37:19 UTC
Some background regarding the GraphicMemoryLimit
https://git.libreoffice.org/core/+/7b355669c6ddeab2e6cec692d6afdff41c61d0fb%5E%21
Comment 7 Patrick (volunteer) 2025-06-15 19:57:19 UTC
(In reply to Telesto from comment #5)
> A) I increased the ImageCacheSize for Skia to 1024 MB, however keeps swapping
> B) I increased the GraphicMemoryLimit from 300 MB to 1024, problem solved,
> even with ImageCacheSize set to 64 MB

OK. I can now reproduce this bug using the steps in comment #4. Also, the bug disappears when I set the GraphicMemoryLimit export preference to 1024000000:

Version: 26.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: a25172b81142df86b7c1854edbeb885d63bf0182
CPU threads: 8; OS: macOS 15.5; UI render: Skia/Raster; VCL: osx
Locale: en-CA (en_CA.UTF-8); UI: en-US
Calc: threaded