[Gimp-developer] [PATCH 0/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
While working on my resampler, I noticed the tile cache often got itself into near-deadlock situations when it was actually working under moderate cache pressure. I have a series of four tile cache performance patches following this mail; one is a simple one-liner that removes a few integer

[Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
Patch attached [to avoid any chance of gmail mangling lines] Detailed patch description at: http://web.mit.edu/xiphmont/Public/gimp-fu/gimp-cache.html Monty 0001-Minor-change-to-TILE_DATA_POINTER-that-restricts-TIL.patch Description: Binary data ___

[Gimp-developer] [PATCH 2/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
Patch attached [to avoid any chance of gmail mangling lines] Detailed patch description at: http://web.mit.edu/xiphmont/Public/gimp-fu/gimp-cache.html Monty 0002-Add-additional-profiling-to-tile-usage-in-order-to-a.patch Description: Binary data ___

[Gimp-developer] [PATCH 3/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
Patch attached [to avoid any chance of gmail mangling lines] Detailed patch description at: http://web.mit.edu/xiphmont/Public/gimp-fu/gimp-cache.html Monty 0003-Replace-two-list-flush-clean-first-cache-strategy-wi.patch Description: Binary data ___

[Gimp-developer] [PATCH 4/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
Patch attached [to avoid any chance of gmail mangling lines] Detailed patch description at: http://web.mit.edu/xiphmont/Public/gimp-fu/gimp-cache.html Monty 0004-Correct-startup-flaw-in-idle-swapper-start-Don-t-wat.patch Description: Binary data ___

Re: [Gimp-developer] Hacking gimp

2009-06-02 Thread Jordan Stinson
Hi, Thanks! That's exactly what I needed. - Jordan On Mon, Jun 1, 2009 at 11:44 PM, Martin Nordholts ense...@gmail.com wrote: Jordan Stinson wrote: Hi, I'm attempting to add new files to the app/widgets directory. I've added a .h and a .c file and the compiler tries to compile it. I seem

[Gimp-developer] Hacking GIMP - Gimp top level menu

2009-06-02 Thread Jordan Stinson
Hi, I was wondering how the top level menu for GIMP is created (The one with these items: File, Edit, Select, View, Image, etc. ). I want to add a menu item to this menu and I'm kind of lost as to where to start. If someone could tell me where to hunt around in the code for this and give me an

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Sven Neumann
Hi, first of all thanks a lot for providing these patches. I definitely want to get them merged as soon as possible. But there are a few minor issues that should be discussed first. So let me start by commenting on your first patch: On Tue, 2009-06-02 at 04:11 -0400, Christopher Montgomery

Re: [Gimp-developer] [PATCH 2/4] Tile caching performance patches

2009-06-02 Thread Sven Neumann
Hi, On Tue, 2009-06-02 at 04:12 -0400, Christopher Montgomery wrote: +#ifdef TILE_PROFILING +#include sys/time.h If we use GTimeVal instead of struct timeval, we can avoid this include (and a possible portability problem). +#ifdef TILE_PROFILING + if ((cur_cache_size + tile-size)

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
On Tue, Jun 2, 2009 at 4:46 PM, Sven Neumann s...@gimp.org wrote: Hi, first of all thanks a lot for providing these patches. I definitely want to get them merged as soon as possible. But there are a few minor issues that should be discussed first. So let me start by commenting on your first

Re: [Gimp-developer] [PATCH 3/4] Tile caching performance patches

2009-06-02 Thread Sven Neumann
Hi, a few more coding style despite the ones I already pointed out: + if(!tile)return FALSE; Please write this as if (! tile) return FALSE; + if(PENDING_WRITE(t)) +acc+=t-size; + t=t-next; Please insert an empty line like this: if (PENDING_WRITE (t)) acc

Re: [Gimp-developer] [PATCH 2/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
+#ifdef TILE_PROFILING +#include sys/time.h If we use GTimeVal instead of struct timeval, we can avoid this include (and a possible portability problem). Agreed. These lines don't adhere to the coding style guidelines. Please add a space after the if and move the opening curly bracket to

Re: [Gimp-developer] [PATCH 4/4] Tile caching performance patches

2009-06-02 Thread Sven Neumann
Hi, On Tue, 2009-06-02 at 04:13 -0400, Christopher Montgomery wrote: -#define IDLE_SWAPPER_TIMEOUT 250 - +#define IDLE_SWAPPER_START 1000 +#define IDLE_SWAPPER_INTERVAL 20 +#define IDLE_SWAPPER_TILES_PER 10 Should that constant perhaps better be called IDLE_SWAPPER_TILES_PER_RUN ?

Re: [Gimp-developer] [PATCH 4/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
On Tue, Jun 2, 2009 at 5:01 PM, Sven Neumann s...@gimp.org wrote: Hi, On Tue, 2009-06-02 at 04:13 -0400, Christopher Montgomery wrote: -#define IDLE_SWAPPER_TIMEOUT  250 - +#define IDLE_SWAPPER_START     1000 +#define IDLE_SWAPPER_INTERVAL  20 +#define IDLE_SWAPPER_TILES_PER 10 Should

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Sven Neumann
Hi, On Tue, 2009-06-02 at 16:56 -0400, Christopher Montgomery wrote: As far as I know pretty much any compiler out there should be able to replace a modulo by a power-of-2 constant by the bit-wise AND operation without us explicitly doing so (see also

[Gimp-developer] Gimp Distro?

2009-06-02 Thread jose lorenzo
I could not figure out if this is the right list of if the topic has come up before. Is there a Linux distro designed to be a training/learning/use/marketing distro for the Gimp? ___ Gimp-developer mailing list

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread David Gowers
I'd like to mention also that there are also some minor problems with whitespace i...@gbubuntu:~/st/gimp2/gimp$ git-am /tmp/0002*.patch Applying Add additional profiling to tile usage in order to analyze efficiency and behavior of the tile cache. Profiling includes run-time indication of idle

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
For about a month I'd turned on emacs's trailing whitespace autotrim and it was a cure worse than the disease. How shall I kill my own whitespace without generating patches 4x larger than necessary due to others' trailing whitespace? Monty ___

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
On Tue, Jun 2, 2009 at 10:15 PM, Christopher Montgomery xiphm...@gmail.com wrote: For about a month I'd turned on emacs's trailing whitespace autotrim and it was a cure worse than the disease.  How shall I kill my own whitespace without generating patches 4x larger than necessary due to

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Christopher Montgomery
In fact, with -O2, gcc is generating more complex assembly for % than , though not an integer division. Assembly generated for version using : tile_data_pointer: .LFB29: movzwl 8(%rdi), %eax andl$63, %edx andl$63, %esi imull %eax, %edx movzbl

Re: [Gimp-developer] [PATCH 1/4] Tile caching performance patches

2009-06-02 Thread Martin Nordholts
Christopher Montgomery wrote: For about a month I'd turned on emacs's trailing whitespace autotrim and it was a cure worse than the disease. How shall I kill my own whitespace without generating patches 4x larger than necessary due to others' trailing whitespace? Caring too much about