GNOME Bugzilla – Bug 599560
[GenericDisplay] Only do redisplay when mapped
Last modified: 2009-10-28 16:20:27 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).
Created attachment 146211 [details] [review] [GenericDisplay] Only do redisplay when mapped
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 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.