[gnome-shell] Limit dash docs to 50
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Limit dash docs to 50
- Date: Tue, 15 Dec 2009 21:16:48 +0000 (UTC)
commit a8d18ac18a8177b971896be7c5c666a0e720f535
Author: Colin Walters <walters verbum org>
Date: Mon Dec 7 21:48:31 2009 -0500
Limit dash docs to 50
We has poor performance if we try to allocate hundreds of actors;
a bit more ideally, we'd keep pulling as much as we can, but really
no one should have more than 50 in the list as is now except on
unreasonably large screen sizes.
In the future we should change this to be pull-on-demand thing
in a chunked fashion.
https://bugzilla.gnome.org/show_bug.cgi?id=603522
js/ui/docDisplay.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/docDisplay.js b/js/ui/docDisplay.js
index 6afcf4f..9ba6c4c 100644
--- a/js/ui/docDisplay.js
+++ b/js/ui/docDisplay.js
@@ -16,6 +16,7 @@ const DND = imports.ui.dnd;
const GenericDisplay = imports.ui.genericDisplay;
const Main = imports.ui.main;
+const MAX_DASH_DOCS = 50;
const DASH_DOCS_ICON_SIZE = 16;
const DEFAULT_SPACING = 4;
@@ -453,7 +454,7 @@ DashDocDisplay.prototype = {
// Should be kept alive by the _actorsByUri
this.actor.remove_all();
let docs = this._docManager.getTimestampOrderedInfos();
- for (let i = 0; i < docs.length; i++) {
+ for (let i = 0; i < docs.length && i < MAX_DASH_DOCS; i++) {
let doc = docs[i];
let display = this._actorsByUri[doc.uri];
if (display) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]