git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Mar 31, 2008, 05:34 UTC
Message-ID
<20080331053430.GJ10274@spearce.org>
In-Reply-To
<1206890314-3712-1-git-send-email-rogersoares@intelinet.com.br>
"Roger C. Soares" <rogersoares@intelinet.com.br> wrote:
Show 10 quoted lines
> 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.
 
Show 13 quoted lines
> 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.
Previous: Roger C. SoaresNext: Roger C. Soares
Message 2 of 6 in “Change history page table to SWT.VIRTUAL.”
  1. 1/4 Change history page table to SWT.VIRTUAL.Roger C. Soares, Mar 30, 2008
  2. Shawn O. PearceMar 31, 2008
  3. Roger C. SoaresApr 1, 2008
  4. Shawn O. PearceApr 1, 2008
  5. Roger C. SoaresApr 1, 2008
  6. Shawn O. PearceApr 1, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.