After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 633516 - performance paint-hooks cause peformance nightmare:
performance paint-hooks cause peformance nightmare:
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-10-29 23:15 UTC by Owen Taylor
Modified: 2011-01-18 19:37 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Owen Taylor 2010-10-29 23:15:38 UTC
We do before and after connections to "paint" on ClutterStage to be able to collect statistics for the performance framework. But ClutterActor does:

      /* Check if there are any handlers connected to the paint
       * signal. If there are then all bets are off for what the paint
       * volume for this actor might possibly be!
       *
       * Actually it's a bit late to find this out because the redraw
       * may have already had a scissor set on the stage based on the
       * projected paint volume of this actor, but since glib doesn't
       * provide a mechanism to notify when signal handlers are
       * connected and removed for a signal we don't have many options
       * and being able to clip redraws is a crucial optimization.
       *
       * If we ever find that a handler is connected we simply mark
       * self->priv->paint_volume_disabled = TRUE which will mean the
       * actor will always report a NULL (un-determined) paint volume.
       * We also queue another redraw of this actor which will result
       * in a full stage redraw. The status is never reverted to FALSE
       * because we don't want to end up in a situation where we see
       * lots of artefacts caused by intermittent periods with no
       * handlers followed by periods with handlers that paint outside
       * the paint volume.
       */
      if (g_signal_has_handler_pending (self,
                                        actor_signals[PAINT],
                                        0,
                                        TRUE))
        {
          priv->paint_volume_disabled = TRUE;
          clutter_actor_queue_redraw (self);
          priv->last_paint_box_valid = FALSE;
        }

(Note that the "status is never reverted to false bit" in the comment seems to be blatantly inaccurate)

We could disable these signal connections except when collecting perf data, but that makes the whole perf framework pretty much useless.
Comment 1 Owen Taylor 2010-10-29 23:19:11 UTC
> (Note that the "status is never reverted to false bit" in the comment seems to
> be blatantly inaccurate)

Never mind this part :-) ... was misreading the code there.
Comment 2 Owen Taylor 2010-10-29 23:35:12 UTC
I think this is pretty easily fixable in Clutter and nothing is needed to be done with GNOME Shell. Some thoughts can be found at:

 http://bugzilla.clutter-project.org/show_bug.cgi?id=2388
Comment 3 drago01 2011-01-06 10:59:56 UTC
Can we close this now? It is fixed at the clutter side already.