Bug 104159 - Uncached glyphs cause slow UI with new layout engine in Windows
Summary: Uncached glyphs cause slow UI with new layout engine in Windows
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta1
Hardware: All Windows (All)
: high major
Assignee: Khaled Hosny
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords: notBibisectable, perf, regression
Depends on:
Blocks: VCL-OpenGL HarfBuzz-regressions
  Show dependency treegraph
 
Reported: 2016-11-25 11:44 UTC by Aron Budea
Modified: 2016-12-16 21:37 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2016-11-25 11:44:40 UTC
1. Start two empty spreadsheets in Calc.
2. Switch between them quickly (eg. with Alt-Tab).

=> with default rendering the switch is instant, but if OpenGL enabled it's noticeably slower.

Switching is still instant in 5.3alpha1 even with OpenGL enabled. => regression
Comment 1 Aron Budea 2016-11-25 11:47:36 UTC
Tested with 5.3beta1 / Windows 7.
Comment 2 Aron Budea 2016-11-25 16:21:49 UTC
Hi Luke, is there a chance you could confirm and maybe bibisect this?
Comment 3 V Stuart Foote 2016-11-26 15:11:05 UTC
On Windows 10 Pro 64-bit (1607) en-US with nVidia GTX-750ti (Driver Version	21.21.13.7270)

Version: 5.3.0.0.beta1 (x64)
Build ID: 690f553ecb3efd19143acbf01f3af4e289e94536
CPU Threads: 8; OS Version: Windows 6.19; UI Render: GL; Layout Engine: new; 
Locale: en-US (en_US); Calc: CL

No appreciable delay in Alt-Tab movement between two Calc documnets. And no change when disabling OpenGL rendering to use default GDI+
Comment 4 Xisco Faulí 2016-11-27 19:19:45 UTC
I can't reproduce it in

Version: 5.4.0.0.alpha0+
Build ID: 7c5aaa254f444d54b9ebf6574f0ccd37af548ee5
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 5 Aron Budea 2016-11-28 04:57:19 UTC Comment hidden (obsolete)
Comment 6 Aron Budea 2016-11-28 05:03:09 UTC
With common layout disabled (SET SAL_NO_COMMON_LAYOUT=1), switching between windows is instantaneous even with OpenGL enabled. That's why it wasn't present in 5.3alpha1, and turns out bibisecting it is unnecessary.

This might actually be a slight general performance regression with the new layout engine, I see that navigating through menus is a bit slower as well (hardly noticeable, but noticeable).

I'm not sure if this affects Linux, with OpenGL I can only test in Windows 7.
Comment 7 Khaled Hosny 2016-11-28 05:13:25 UTC
That is know issue on Windows, we don’t currently cache the glyphs when doing OpenGL rendering with the new layout engine as we did before. Unfortunately I don’t have OpenGL enabled, so someone else will need to look into this.
Comment 8 Aron Budea 2016-11-28 22:11:00 UTC
(In reply to Khaled Hosny from comment #7)
> That is know issue on Windows, we don’t currently cache the glyphs when
> doing OpenGL rendering with the new layout engine as we did before.
> Unfortunately I don’t have OpenGL enabled, so someone else will need to look
> into this.

Ok, setting to NEW.

Could you give a bit of details? Is this a lot of work? Can the old code at least partly be reused? Where is the old code? What should be the major differences in tackling the problem compared to the old method?

I think the performance degradation seriously impacts user experience, and this issue should be tackled before release.
Comment 9 Khaled Hosny 2016-11-28 22:59:04 UTC
If some wants o work on this, I can give some pointers. I obviously don’t know how much work is it.
Comment 10 Commit Notification 2016-12-16 04:33:20 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9cf20b5f0473db0b4dd2dcf607b7884f40762995

tdf#104159: Re-enable OpenGL glyph caching on Windows

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2016-12-16 05:58:13 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d85003a8af8b454b34eea0ac67c8dd9184a0b6d3&h=libreoffice-5-3

tdf#104159: Re-enable OpenGL glyph caching on Windows

It will be available in 5.3.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Commit Notification 2016-12-16 14:58:20 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ab291ac3b8576a086cab60ffb64d60b046a271a2

tdf#104159: Fix caching glyphs of non-UI fonts

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2016-12-16 21:37:55 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a813623240ac9614c8b2b8b890b9eb83663c72c1&h=libreoffice-5-3

tdf#104159: Fix caching glyphs of non-UI fonts

It will be available in 5.3.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.