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

Sven Neumann sven at gimp.org
Tue Jun 2 13:52:36 PDT 2009


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 += 1000000;
> +         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




More information about the Gimp-developer mailing list