Bug 94682 - VIEWING: OpenGL text rendering performance.
Summary: VIEWING: OpenGL text rendering performance.
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.3 target:5.2.0
Keywords: perf
: 98279 103386 (view as bug list)
Depends on:
Blocks: VCL-OpenGL
  Show dependency treegraph
 
Reported: 2015-10-01 21:36 UTC by kunzjacq
Modified: 2019-02-03 05:52 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
test file exhibiting the scrolling problems. (571.60 KB, application/vnd.oasis.opendocument.text)
2015-10-01 21:36 UTC, kunzjacq
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kunzjacq 2015-10-01 21:36:27 UTC
Created attachment 119182 [details]
test file exhibiting the scrolling problems.

When scrolling inside a large file (see attached) the scrolling is extremely slow under version 5.0.2.2, although it is normal on version 4.4.5 (see attached test file) on a machine with a nvidia graphics card (see details below). This does not happen on a laptop with an intel board. 

happens on:
version 5.0.2.2, windows 10, 4K screen, nvidia 9770 graphics card, x86_64 cpu

does not happen on:
version 4.4.5, windows 10, 4K screen, nvidia 9770 graphics card, x86_64 cpu
version 5.0.1.2, windows 10, intel broadwell graphics card, x86_64 cpu
version 5.0.2.2, windows 10, intel broadwell graphics card, x86_64 cpu
version 4.4.5, linux ubuntu 14.10, x86_64 cpu, nvidia graphics card
Comment 1 kunzjacq 2015-10-01 21:44:49 UTC
Additionally, the problem disappears if one disables the openGL rendering in libreoffice settings.
Comment 2 kunzjacq 2015-10-01 21:48:12 UTC
more details on the graphics card:

GTX 970 (and not 9770 -  my mistake)
355.98 driver
Comment 3 Levente Giczi 2015-10-31 15:08:40 UTC
Confirmed. Win10 GTX 970 version 5.xxx slow scroll and slow draw on windows hide/unhide. HW accel. checkbox in options is unavailabe. On 4.x version evrything is ok, but if you check OpenGL use checkbox then libreoffice wont start.
Comment 4 Levente Giczi 2015-11-03 15:43:54 UTC
Problem is only Win related. Working well on Gentoo. (compiled from source)
Comment 5 Buovjaga 2015-11-09 18:13:41 UTC
NEW per comment 3.

Note "HW accel. checkbox in options is unavailabe." is by design.
Comment 6 Michael Meeks 2016-01-11 11:04:53 UTC
Please can you re-test this with LibreOffice 5.1.0 RC2 - due this week ? there has been a very large number of GL related performance and rendering fixes for that.

Thanks !
Comment 7 Michael Meeks 2016-01-13 10:51:45 UTC
Tor - text rendering performance is far less than ideal here in 5.1.0 RC2 too - I'd love to get a profile of that; I'd suspect GL / program selection for glyph rendering ;-) either way, would be good to see what we can do here.
Comment 8 How can I remove my account? 2016-01-14 09:00:36 UTC
I don't see any "extreme" slowness when scrolling, in a fresh build from the 5.1 branch, a build with --enable-debug even. This is on a medium performance (?) AMD A10-7800 machine from last year.
Comment 9 How can I remove my account? 2016-01-14 09:05:02 UTC
(But sure, I am the first one to admit that text rendering is far from ideal, for correctness and probably also performance. For this sample document, I can't reproduce any horrible slowness, though.)
Comment 10 Roman Kuznetsov 2016-01-14 11:02:26 UTC
Version: 5.1.0.1.0+
ID build: e9e641b39a98df8c6aef8d2f12f4a589ed887612
CPU Threads: 4; OS Version: Windows 6.1; UI Render: GL; 
TinderBox: Win-x86@62-merge-TDF, Branch:libreoffice-5-1, Time: 2016-01-12_11:37:42
Locale: ru-RU (ru_RU)

Video: Intel HD4000 with latest driver

1. the entire text of document is character "a". Why?

>happens on:
>version 5.0.2.2, windows 10, 4K screen, nvidia 9770 graphics card, x86_64 cpu

2. scrolling text with OpenGL - OK. Not slow, but sreen resolution 1366x768.
Comment 11 How can I remove my account? 2016-01-14 11:06:13 UTC
>  entire text of document is character "a". Why?

Because the original document presumably was confidential? The bug reporter does say it is a "test file"
Comment 12 kunzjacq 2016-01-17 18:01:38 UTC
I tested again the behavior today on LibreOffice 5.1 RC2 with exactly the same settings as in my original bug report : windows 10 x64, 4k screen, Nvidia GTX 970 (now with drivers 361.43). Same file as before.

in OpenGL rendering mode, the rendering is somewhat faster that with version 5.0.2.2, but still **way** slower that when OpenGL is off. This is easily seen when several pages are displayed at once. If I display 5 x 2 pages on screen, and I try to scroll using the down arrow, the screen refreshes less than 1 time per second in openGL mode, vs. 5-6 times per second without openGL.

With 5.0.2.2, The same experiment completely froze libreoffice in openGL mode, so I guess that we can say that there is some improvement.
Comment 13 Michael Meeks 2016-03-12 22:57:12 UTC
Tomaz has been working to improve text rendering performance.
Comment 14 Michael Meeks 2016-03-14 21:38:24 UTC
*** Bug 98279 has been marked as a duplicate of this bug. ***
Comment 15 Michael Meeks 2016-04-08 14:49:04 UTC
Tomaz' patch significantly improves things here; but I think that much of the perceived lag I see is because the scroll-bar when dragged does not update at the same time as the window pane we are viewing =) it is out of sync and/or delayed - I imagine this is down to a rendering sequence issue.

Tomaz - could you look at that ? =)
Comment 16 Commit Notification 2016-04-08 14:51:08 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#94682 optimize texture drawing on Win. (squashed multi commits)

It will be available in 5.1.3.

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 17 Commit Notification 2016-04-18 10:06:56 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

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

tdf#94682 limit the number of textures for the glyph texture atlas

It will be available in 5.1.3.

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 18 Commit Notification 2016-04-18 13:02:30 UTC
Tomaž Vajngerl committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94682 limit the number of textures for the glyph texture atlas

It will be available in 5.2.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 19 Tomaz Vajngerl 2016-05-12 11:03:29 UTC
Scrolling issues is tracked in https://bugs.documentfoundation.org/show_bug.cgi?id=99574
Comment 20 kunzjacq 2016-06-19 19:40:28 UTC
Did the same test again (see comment #12), both with 5.1.4 and 5.2.0.0 beta2 x64. The result is unchanged: the CPU rendering is much faster than the openGL rendering. The approximate figures given in comment #12 are still valid. I don't see much difference between version 5.1.4 and 5.2.0.0 beta2.
Comment 21 Yousuf Philips (jay) (retired) 2016-10-20 00:25:25 UTC
Hi kunzjacq,

Can you test the latest master build to see if there is any difference.

http://dev-builds.libreoffice.org/daily/master/Win-x86@62-merge-TDF/current/
Comment 22 kunzjacq 2016-10-22 20:28:39 UTC
tested with installer master~2016-10-21_17.41.07_LibreOfficeDev_5.3.0.0.alpha1_Win_x86_en-US_de_ar_ja_ru_vec_qtz.msi
as requested.

The problem is still here.

a quick summary:
environment is Windows 10 x64 (1607), Nvidia GTX970, 372.54 driver, intel i7-4770 processor (intel GPU disabled in bios), 3840x2160 resolution, text size 200%.

without openGL rendering, on the test document I provided, if display 5x2 pages on-screen, and hit page-down, I get 5-6 fps. 

with openGL, the same test results in about 0.5-1 fps.

I see no other issues with openGL or hardware display acceleration on this machine (in games or other applications), so I don't think any outside problem interfers with LibrOffice.
Comment 23 hitche@yandex.ru 2016-10-23 10:56:32 UTC
Confirm problem with drivers NVIDIA 340.65 and 367.57 in LO 5.1.5 (Debian 8 amd64).
Comment 24 hitche@yandex.ru 2016-10-23 10:57:37 UTC
*** Bug 103386 has been marked as a duplicate of this bug. ***
Comment 25 Yousuf Philips (jay) (retired) 2016-10-23 14:13:32 UTC
Setting it as NEW as hitche also repos it.
Comment 26 hitche@yandex.ru 2017-01-31 15:52:47 UTC
Does not happen on version LO 4.3.3 and 5.2.5 with drivers NVIDIA 340.65 and 367.57 Debian 8 amd64. The developers have broken, repaired and silent? oO :)
Comment 27 QA Administrators 2018-02-01 03:45:09 UTC Comment hidden (obsolete)
Comment 28 kunzjacq 2018-02-01 06:59:07 UTC
Tested again with version 6.0.0.3 windows x64. Testing config is as before: windows 10, 4K screen, NVidia GTX 970.

The bug is still present. Excerpt from comment #12 is still applicable with updated approximate performance figures: 

If I display 5 x 2 pages on screen [with test file], and I try to scroll using the down arrow, the screen refreshes less than [1-2] time per second in openGL mode, vs. [5-10] times per second without openGL.
Comment 29 Karsten 2019-01-16 11:25:58 UTC Comment hidden (obsolete)
Comment 30 kunzjacq 2019-01-28 23:03:38 UTC
Tested once again with several versions of LO, on windows 10 x64 1809. Everything is the same as before on the test config except the graphics card (was NV GTX 970, is now NV GTX 1080 Ti).

With 6.0.0.3, if I display 5 x 2 pages on screen with test file, and I scroll using the page down arrow, the screen refreshes about 2 times per second in openGL mode, vs. 4-5 times per second without openGL. 

With 6.0.7, in the same test, the speeds are the same.

With 6.2.0.2, in the same test, the screen refreshes 10-15 time per second in openGL mode, vs. the unchanged figure of 4-5 times per second without openGL.

It seems therefore that some openGL performance bug was fixed between 6.0.7 and 6.2.0.2, and the behavior now seems normal.
Comment 31 Aron Budea 2019-02-03 05:52:14 UTC
Let's use status WORKSFORME, as the fixing change is unknown.