[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 mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


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)  max_cache_size){
 +   struct timeval now;
 +   struct timeval later;
 +   gettimeofday(now,NULL);

Please use GTimeVal and g_get_current_time() here.

 +   if(tile_total_interactive_usec  0){
 + tile_total_interactive_usec += 100;
 + tile_total_interactive_sec--;
 +   }

These lines don't adhere to the coding style guidelines. Please add a
space after the if and move the opening curly bracket to the next line.
There are other places in your patches that need similar fixes.

Other than these nit-picking style issues, the patch looks good to me.
Nice work!


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


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 the next line.
 There are other places in your patches that need similar fixes.

I'll make that change too and resubmit.

Monty
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer