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 599560 - [GenericDisplay] Only do redisplay when mapped
[GenericDisplay] Only do redisplay when mapped
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-25 15:26 UTC by Colin Walters
Modified: 2009-10-28 16:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[GenericDisplay] Only do redisplay when mapped (2.33 KB, patch)
2009-10-25 15:26 UTC, Colin Walters
none Details | Review
[GenericDisplay] Only do redisplay when mapped (2.46 KB, patch)
2009-10-25 21:50 UTC, Colin Walters
committed Details | Review

Description Colin Walters 2009-10-25 15:26:18 UTC
If we're not mapped, only queue up a redisplay.  This avoids
e.g. changes in recent documents such as saving a file in GEdit
causing a lot of blocking I/O in the shell (we need to make
recent loading async as well).
Comment 1 Colin Walters 2009-10-25 15:26:20 UTC
Created attachment 146211 [details] [review]
[GenericDisplay] Only do redisplay when mapped
Comment 2 Colin Walters 2009-10-25 21:50:55 UTC
Created attachment 146228 [details] [review]
[GenericDisplay] Only do redisplay when mapped

If we're not mapped, only queue up a redisplay.  This avoids
e.g. changes in recent documents such as saving a file in GEdit
causing a lot of blocking I/O in the shell (we need to make
recent loading async as well).
Comment 3 Dan Winship 2009-10-26 14:05:56 UTC
Comment on attachment 146228 [details] [review]
[GenericDisplay] Only do redisplay when mapped

>     _redisplay: function(flags) {
>+        if (!this._list.mapped) {
>+            this._pendingRedisplay |= flags;
>+            return;
>+        }
>+
>         let isSubSearch = (flags & RedisplayFlags.SUBSEARCH) > 0;
>         let fullReload = (flags & RedisplayFlags.FULL) > 0;
>         let resetPage = (flags & RedisplayFlags.RESET_CONTROLS) > 0 || fullReload;
> 
>+        this._pendingRedisplay = RedisplayFlags.NONE;

This looks like it's a bug; you set isSubSearch etc based on flags but then clear _pendingRedisplay. Of course, after looking at _onMappedNotify I see that it is actually correct, but it's confusing. I think it would be better to clear this._pendingRedisplay from _onMappedNotify.

OK to commit with that change.