Bug 168699 - Complex SVG image takes long time to load on file open or when inserting
Summary: Complex SVG image takes long time to load on file open or when inserting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: perf
Depends on:
Blocks:
 
Reported: 2025-10-05 06:47 UTC by elias estatistics
Modified: 2025-10-07 03:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
buggy odt (884.58 KB, application/vnd.oasis.opendocument.text)
2025-10-05 06:47 UTC, elias estatistics
Details
SVG from ODT (1.45 MB, image/svg+xml)
2025-10-05 10:39 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description elias estatistics 2025-10-05 06:47:00 UTC
Created attachment 203143 [details]
buggy odt

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 51ac1a796b2f4bfbd0fa03d053e2f21973960337
CPU threads: 24; OS: Linux 6.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


It takes much time to load a document, containing only one picture. 
In terminal, some warnings about missing stock icons




In terminal: 


warn:legacy.osl:165628:165628:sw/source/uibase/app/docstyle.cxx:1327: SwCharFormat missing!

warn:legacy.osl:165628:165628:sw/source/uibase/app/docstyle.cxx:1333: Collection missing!

!
warn:writerfilter:165628:165628:sw/source/writerfilter/dmapper/PropertyMap.cxx:625: Paper source not found com.sun.star.lang.IllegalArgumentException ArgumentPosition: 0
warn:legacy.osl:165628:165628:oox/source/helper/storagebase.cxx:67: StorageBase::StorageBase - missing base input stream
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_sendtomenu.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_sendtomenu.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_signaturesmenu.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_signaturesmenu.png
warn:sal.osl:165628:165628:sal/osl/unx/module.cxx:100: dlopen(/opt/libreofficedev26.2/program/libjava_gcc3.so, 257): /opt/libreofficedev26.2/program/libjava_gcc3.so: cannot open shared object file: No such file or directory
warn:sal.osl:165628:165628:sal/osl/unx/module.cxx:100: dlopen(/opt/libreofficedev26.2/program/libgcc3_java.so, 257): /opt/libreofficedev26.2/program/libgcc3_java.so: cannot open shared object file: No such file or directory
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_selectionmodemenu.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_selectionmodemenu.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_pastenestedtable.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_pastenestedtable.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_pasterowsbefore.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_pasterowsbefore.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_pastecolumnsbefore.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_pastecolumnsbefore.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_reinstatetrackedchange.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_reinstatetrackedchange.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_reinstatetrackedchangetonext.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_reinstatetrackedchangetonext.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_reinstatealltrackedchanges.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_reinstatealltrackedchanges.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_editfootnote.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_editfootnote.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_indexentrydialog.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_indexentrydialog.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_authoritiesentrydialog.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_authoritiesentrydialog.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_uipicker.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_uipicker.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_toolbarlock.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_toolbarlock.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_toolbarlock.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_toolbarlock.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_zoom50percent.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_zoom50percent.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_zoom200percent.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_zoom200percent.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_toolbarlock.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_toolbarlock.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_formattingmarkmenu.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_formattingmarkmenu.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_twainselect.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_twainselect.png
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:103: Failed to load scaled image from cmd/sc_insertnonbreakingspace.png at 1
warn:vcl:165628:165628:vcl/source/image/ImplImage.cxx:127: Failed to load stock icon cmd/sc_insertnonbreakingspace.png
Comment 1 elias estatistics 2025-10-05 06:51:11 UTC
chatgpt cant help me howto produce heatmap of component loading times in LO for nightly builds. How I do it? Or i must recompile from source?
Comment 2 elias estatistics 2025-10-05 07:00:16 UTC
ok the image was saved internally as svg.... maybe this was taking time.... 
when saved as png opened instantly. I dont know if this can still can count as bug...
Comment 3 elias estatistics 2025-10-05 07:02:17 UTC
note that ebook viewer open the odt item instantly
Comment 4 Telesto 2025-10-05 10:39:40 UTC
Created attachment 203147 [details]
SVG from ODT
Comment 5 Telesto 2025-10-05 10:45:22 UTC
STR
1. Open a writer document
2. Insert - Image -> attachment 203147 [details]

Or
1. open attachment 203143 [details]

Found in
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b1c0c4838d2e006ffa8e72516569ce8d13bdbe01
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded


and in
Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

and in
Versie: 4.1.0.4 
Build ID: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

----
rtl_math_approxEqual
basegfx::utils::isPointOnLine
basegfx::utils::isPointOnPolygon
basegfx::utils::isInside
basegfx::utils::isInside
basegfx::utils::createNonzeroConform
[00007FFCC4A4DEF6]
[00007FFCC4A47572]
[00007FFCC4A43A9A]
[00007FFCC4A317C5]
[00007FFCC4A43A9A]
[00007FFCC4A317C5]
[00007FFCC4A43A9A]
[00007FFCC4A317C5]
[00007FFCC4A43A9A]
[00007FFCC4A317C5]
[00007FFCC4A43A9A]
[00007FFCC4A59FA2]
[00007FFCC4A6D757]
VectorGraphicData::ensureSequenceAndRange
ImpGraphic::getSwapFileStream
Graphic::GetPrefSize
Comment 6 Telesto 2025-10-05 10:49:49 UTC
@Noel
There is quite some optimization possible here, I guess.
Comment 8 Noel Grandin 2025-10-06 11:23:19 UTC
I dont see any possible optimisations here. We have to convert this to our internal representation, and this SVG is not using even-odd paths, so there is not much we can do (unless we just don't bother to render it properly)
Comment 10 Saburo 2025-10-07 03:45:07 UTC
for reference
svg file open peformance
Version: 6.1.0.0.alpha1+
Build ID: 3ca7be09834a26fbd1c371deabd7a58111092676

Starting with this commit, files now take longer to open.
Before this commit, files opened quickly but inaccurately.