Opened 4 years ago

Closed 2 years ago

#4915 closed defect (notsugar)

Write redraws excessively - heats my lap

Reported by: SAMdroid Owned by:
Priority: High Milestone: Unspecified
Component: Write Version: Git as of bugdate
Severity: Major Keywords:
Cc: Distribution/OS: Fedora
Bug Status: Unconfirmed

Description

I was doing something in write and noticed that it resulted in my fans spinning up all the way and heating up my leg. This is especially noticeable when running 2 instances and using collaboration.

You can see the top of the abiword canvas flickering through grey as well. After going into the Gtk+ inspector and ticking the box to show redraws, the whole canvas was flashing red (redraw) multiple times a seccond.

I couldn't see it on the abiword GNOME app, but I'm pretty sure I've seen it there before. Maybe they patched it in their app but we haven't?

Fedora rawhide 24 with abiword-3.0.1-4.fc23.x86_64. There's a new release coming up at the end of this month, so I better check then.

Change History (6)

comment:1 Changed 4 years ago by SAMdroid

  • Component changed from Sugar to Write

comment:2 Changed 3 years ago by quozl

Also occurs with Abiword 3.0.1 on Ubuntu 16.04.

When the draw signal is connected on the Abi.Widget, normal calls occur until the first character is typed, then a continuous stream of signals is received, with a Cairo clip rectangle corresponding to the document body.

Method:

    def __init__(self, handle):
        ...
        self.abiword_canvas.connect('draw', self.__draw_cb)

    def __draw_cb(self, widget, cr):
        logger.error('__draw_cb cr=%r' % cr.copy_clip_rectangle_list())

Result:

1467794524.658957 ERROR write-activity: We are creating an activity
1467794524.729933 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1024.0, 768.0)
1467794524.746117 ERROR write-activity: __draw_cb cr=(1009.0, 0.0, 15.0, 633.0)
1467794526.992213 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.010463 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.027780 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.045404 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.062891 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.080091 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.098255 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.115963 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.132660 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.149889 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)
1467794527.168202 ERROR write-activity: __draw_cb cr=(0.0, 0.0, 1009.0, 768.0)

My guess is that this is a regression in Abiword or Gtk. It also occurs with /usr/bin/abiword started from Terminal in Sugar and Terminal in Gnome. So it isn't a problem with Write itself.

See also https://bugs.launchpad.net/ubuntu/+source/abiword/+bug/1574278

Last edited 3 years ago by quozl (previous) (diff)

comment:4 Changed 3 years ago by quozl

Last edited 3 years ago by quozl (previous) (diff)

comment:5 Changed 3 years ago by quozl

Continues to be a problem in AbiWord, and by consequence also Write.

Theme change workaround in OLPC OS is working reasonably well, though the activity toolbar has acquired the theme change as well on Ubuntu 16.04 with updates. Workaround does not work on Ubuntu 17.04 with updates; the flickering is back.

AbiWord upstream hasn't found a fix yet. Debian package is affected, but is orphaned. Ubuntu package is derived from the Debian package. Fedora package also affected.

Various bug references:

The problem depends on graphics performance relative to CPU performance, some people are unable to reproduce it, although instrumenting the draw callback described above can help to verify it is present.

Options for Sugar Labs are:

  • find and fix the problem in AbiWord,
  • switch from using AbiWord to another embeddable word processor,
  • switch to a GTK+ rich text editor widget,
  • switch to GOffice or WebKit2 editor, if they are stable enough.
  • switch to a web activity.

comment:6 Changed 2 years ago by quozl

  • Resolution set to notsugar
  • Status changed from new to closed

I've fixed it in AbiWord and made a custom build.

The problem was in AbiWord; the caret cursor blinked more than it should, calling Gtk.Widget.queue_draw() on each blink, passing the whole drawing area, thus causing many Gtk.Widget.draw events.

Most critical change was to call Gdk.flush() instead of Gtk.Widget.queue_draw().

The problem was difficult to reproduce for some people because it was caused by a race between a 10ms timer and the event queue.

So I'll close this now as notsugar.

Note: See TracTickets for help on using tickets.