Bug 150384 - Perf: scrolling a large Hebrew document in multipage view is slower compared to Latin (LTR/RTL doesn't appear to matter)
Summary: Perf: scrolling a large Hebrew document in multipage view is slower compared ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.0 alpha0+
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, perf
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2022-08-12 12:47 UTC by Telesto
Modified: 2023-01-27 12:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
VerySleepy Screenshot (404.39 KB, image/jpeg)
2022-08-13 20:42 UTC, Telesto
Details
Perf flamegraph (778.27 KB, image/svg+xml)
2023-01-27 10:52 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-08-12 12:47:06 UTC
Description:
Perf: scrolling a large arabic RTL document in multipage view is slower compared to Latin LTR

Steps to Reproduce:
1. Open attachment 181658 [details]
2. Go to multipage view, zoom out so at minimum 6 pages fit on screen (sidebar can be closed)
3. Scroll the document with scroll-wheel (laggy)
4. Open some big file for comparison. Like Writer Manual: https://nextcloud.documentfoundation.org/s/G3DqCoDE9bxQ2m2/download?path=%2F&files=WG73-WriterGuide.odt&downloadStartSecret=20ftbxb5z6z
5. Set it again to multi-page view; 6 pages and scroll

Actual Results:
Performance is slowish

Expected Results:
Current is not bad, but there is room for improvement


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 86b2bfd34a4f07c54f03c8c8dfe48e0810834628
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 ⁨خالد حسني⁩ 2022-08-13 15:56:27 UTC
The attachment document is in Hebrew not Arabic.
Comment 2 Eyal Rozenberg 2022-08-13 16:42:02 UTC
So, is this an Arabic issue or an RTL issue?
Comment 3 ⁨خالد حسني⁩ 2022-08-13 16:44:51 UTC
I don’t know, I couldn’t see a difference in scrolling the two documents.

I was looking because Kashida justification in Arabic does not seem to use the glyph cache and I was wondering if it affects performance. Since this is Hebrew, Kashida would be irrelevant.
Comment 4 Telesto 2022-08-13 20:42:04 UTC
Created attachment 181760 [details]
VerySleepy Screenshot

Some very basic perf trace without symbols. Appears to be in TextLayout/ GlyphCache
Comment 5 Telesto 2022-08-13 20:46:53 UTC
(In reply to Khaled Hosny from comment #1)
> The attachment document is in Hebrew not Arabic.

Sorry, me and non-Latin languages.. Next time I put some text snipped into a translator..
Comment 6 Eyal Rozenberg 2022-08-13 21:49:39 UTC
Damn it, that's the attachment I posted! It's the guide to the Israeli military prison system. I'm the editor :-P

Let me ask you, though - in your LO installation, do you have a font substitution for David? And can you provide a screenshot of the second page (the first one with lots of text)?

> zoom out so at minimum 6 pages fit on screen (sidebar can be closed)

6 pages _fully_ fit the view, or 6 pages intersect it? Is it important that 2 full "rows" of pages fit completely?
Comment 7 Buovjaga 2023-01-27 10:52:40 UTC
Created attachment 184958 [details]
Perf flamegraph

Took a perf trace of showing 6 pages in a row and scrolling by dragging the scrollbar.

I see lots of time is spent in SwSubFont::DrawText_

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 668f55b65849012b359d7d6b9386113facbadc57
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Comment 8 Buovjaga 2023-01-27 10:53:03 UTC
Let's set to new as we have a trace.
Comment 9 Eyal Rozenberg 2023-01-27 12:43:14 UTC
I doubt this issue is Hebrew-specific, so hanging on the more general meta-bug