Thread (6 messages) flat view 6 messages, 2 authors, 2016-06-15

Re: [EGIT PATCH 1/4] Change history page table to SWT.VIRTUAL.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:44:26

"Roger C. Soares" [off-list ref] wrote:
It makes the history page show about the same speed as gitk on my
eclipse.

From the eclipse API:

"Style VIRTUAL is used to create a Table whose TableItems are to be
populated by the client on an on-demand basis instead of up-front.
This can provide significant performance improvements for tables
that are very large or for which TableItem population is expensive
(for example, retrieving values from an external source)."
Yea, I originally wrote my series around the VIRTUAL flag but on
Win32 it caused ArrayIndexOutOfBoundsExceptions to be thrown from
deep down within the Win32 implementation of the SWT Table widget.

Appears to be something of a known bug, based on the Eclipse issue
tracker, but not much work happening to fix it.

I'll retest this tomorrow on Win32, but I'm pretty certain its
a bad idea on that platform.  What are you running on, Linux?
Maybe we can set this flag everywhere except on Win32.
 
quoted hunk ↗ jump to hunk
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitGraphTable.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitGraphTable.java
index fffe7e0..6559d64 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitGraphTable.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/history/CommitGraphTable.java
@@ -88,7 +88,7 @@ class CommitGraphTable {
 		hFont = highlightFont();
 
 		final Table rawTable = new Table(parent, SWT.MULTI | SWT.H_SCROLL
-				| SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION);
+				| SWT.V_SCROLL | SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
 		rawTable.setHeaderVisible(true);
 		rawTable.setLinesVisible(false);
 		rawTable.setFont(nFont);
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help