Skip to content

Conversation

@Piiit
Copy link
Collaborator

@Piiit Piiit commented Jun 9, 2017

Fixes #70

This patch is based on:

https://git.gnome.org/browse/evince/commit/?id=1987f04ea36329b1bd61d053a19d9e341e0454ce

author Sebastian Keller sebastian-keller@gmx.de 2015-09-22 21:25:34 (GMT)

libview: Save/restore context when getting colors for a different state

Getting colors for a state different from the current state of the
corresponding widget without saving the context might trigger an
invalidation and a redraw. Because this was happening from the draw
function this resulted in a redraw loop and constant high CPU usage.

This could be triggered by selecting text or searching.

https://bugzilla.gnome.org/show_bug.cgi?id=755442

Fixes linuxmint#70

This patch is based on:

  https://git.gnome.org/browse/evince/commit/?id=1987f04ea36329b1bd61d053a19d9e341e0454ce

  author  Sebastian Keller <sebastian-keller@gmx.de>  2015-09-22 21:25:34 (GMT)

  libview: Save/restore context when getting colors for a different state

  Getting colors for a state different from the current state of the
  corresponding widget without saving the context might trigger an
  invalidation and a redraw. Because this was happening from the draw
  function this resulted in a redraw loop and constant high CPU usage.

  This could be triggered by selecting text or searching.

  https://bugzilla.gnome.org/show_bug.cgi?id=755442
@JosephMcc
Copy link
Contributor

Finally had the chance to test this. It seems to work and solve the issue.

@clefebvre clefebvre merged commit e76a18d into linuxmint:master Jun 19, 2017
@jeisner
Copy link

jeisner commented Jun 19, 2017

Thank you! Looking forward to seeing the fix via mintUpdate.

@Piiit Piiit deleted the highcpu branch July 12, 2017 08:01
@jerkey
Copy link

jerkey commented Jul 13, 2023

I'm still experiencing this "Having selected text leads to high cpu load", xreader was eating an entire CPU core.
xreader 3.2.2
Linux eg 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Linux Mint 20.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Having selected text leads to high cpu load.

5 participants