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

Re: [PATCH 1/2] Simpler way to draw commit graph

From
MCMarco Costalba <mcostalba@gmail.com>
Date
Oct 20, 2006, 11:46 UTC
Message-ID
<e5bfff550610200446o35bac985n3d520066fdbae2bb@mail.gmail.com>
In-Reply-To
<200610191613.31119.Josef.Weidendorfer@gmx.de>
On 10/19/06, Josef Weidendorfer <Josef.Weidendorfer@gmx.de> wrote:
Show 18 quoted lines
> For drawing the commit graph, previously every item got a
> pixmap created and set with item->setPixmap(), which is
> drawn by the standard implementation of QListView::paintCell().
>
> Instead, this commit implements drawing of the graph
> directly in our own ListView::paintCell(). This gets rid of
> a lot of complex code to reset the pixmap of invisible items
> which was needed in large repositories before to not allocate
> huge amounts of memory.
>
> As we directly draw only the visible cells, it has no
> influence on performance (especially, as we got rid of
> pixmaps of invisible items before, and most often had
> to draw the graph anyway).
>
> Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
> ---
>
It looks sane. Thanks, I will apply this week-end.
Show 5 quoted lines
>
> In order to solve this, I looked at the code, and do not understand
> one thing: Why are you creating pixmaps for the graph, and do
> draw directly in paintCell() ?
>

The code to create pixmaps is older then the one to remove not visible pixmaps. When I added the latter I missed the opportunity to reformat exsisting code.

Show 6 quoted lines
> This patch does exactly this, and the next one does cleanup
> of code which is not used afterwards.
>
> If you like, I can comeup with a patch to directly draw the lines
> which would get rid of the original problem.
>
Yes, please.

Thanks Marco

Previous: Josef Weidendorfer
Message 2 of 2 in “Simpler way to draw commit graph”
  1. 1/2 Simpler way to draw commit graphJosef Weidendorfer, Oct 19, 2006
  2. Marco CostalbaOct 20, 2006

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.