Check that the cache itself is idle. Previously it would start during
transforms and long pyramid rendering ops and toss writes and large
seeks into the tile cache while it was potentially under heavy pressure.
Also increase its flush rate more to be more in line with modern system
and editing needs.
Add more profiling In order to analyze efficiency and behavior of the
tile cache. Profiling includes run-time indication of idle swapper
activity.
Also, fixes to original tile profiling code that appears to have
bitrotted some; it was no longer tracking changes made to tile memory
outside of tile.c.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-02-07 Michael Natterer <mitch@gimp.org>
* app/base/base-utils.[ch]: add get_pid() which returns getpid().
* app/base/base.c
* app/base/tile-swap.c
* app/core/gimp-utils.c
* app/plug-in/gimppluginshm.c
* app/widgets/gimpselectiondata.c
* tools/pdbgen/pdb/misc.pdb: use it instead of getpid() and remove
all the #ifdef'ed includes getpid() needs.
* tools/pdbgen/app.pl: remove support for these includes. Also
remove some perl cruft in the include handling which is not needed
any longer.
* app/pdb/misc_cmds.c: regenerated.
svn path=/trunk/; revision=24827
2007-12-12 Tor Lillqvist <tml@novell.com>
* app/base/tile-private.h
* app/base/tile-swap.c: Move the LARGE_SEEK and LARGE_TRUNCATE
macros from tile-private.h to tile-swap.c as they aren't used
anywhere else, and the helper function used on Windows was static
in tile-swap.c anyway. (#503124)
svn path=/trunk/; revision=24331
2007-06-21 Sven Neumann <sven@gimp.org>
* app/base/tile-manager.[ch]: use gboolean for boolean parameters.
* app/base/tile-pyramid.c (tile_pyramid_get_memsize): pass TRUE
for sparse to tile_manager_get_memsize().
* app/base/tile.c
* app/base/tile-swap.c: minor cleanups.
* app/core/gimpprojection.c (gimp_projection_get_tiles_at_level):
inline the creation of the TilePyramid.
svn path=/trunk/; revision=22818
2007-05-22 Sven Neumann <sven@gimp.org>
* app/base/siox.c: allocate structs using GSlice.
* app/base/tile-swap.[ch]
* app/xcf/xcf-load.c: removed dead code that used to deal with
swapping from XCF files. Simplified swap file code quite a bit.
svn path=/trunk/; revision=22585
2007-02-22 Sven Neumann <sven@gimp.org>
* app/base/tile.[ch]: made tile_ref_count a static variable and
added a function to access it. Declared other (unused) global
counters as static variables and moved them into #ifdefs.
* app/base/tile-swap.c: use the function instead of declaring
tile_ref_count as extern.
* app/base/tile-manager.c
* app/base/pixel-surround.c: cosmetics.
svn path=/trunk/; revision=21975
2007-01-26 Tor Lillqvist <tml@novell.com>
Fix#398311 in GIMP until corresponding abstraction has been added
to GLib:
* app/base/tile-private.h: Use gint64 instead of off_t. (I assume
the configury makes sure GIMP is always compiled as
large-file-aware on Unix with an off_t of at least 64 bits?)
Introduce wrapper macros LARGE_SEEK() and LARGE_TRUNCATE(). On
Win32 LARGE_SEEK() calls _lseeki64() in the Microsoft C library,
and LARGE_TRUNCATE calls a new internal function
gimp_win32_large_truncate(). On Unix they call lseek() and
ftruncate().
* app/base/tile-swap.c: Use gint64 instead of off_t. Use
LARGE_SEEK() and LARGE_TRUNCATE() instead of lseek() and
ftruncate().
(gimp_win32_large_truncate): New function. Calls LARGE_SEEK() and
SetEndOfFile().
* app/xcf/xcf-load.c (xcf_swap_func): Use LARGE_SEEK() instead of
lseek().
svn path=/trunk/; revision=21785
2006-09-07 Sven Neumann <sven@gimp.org>
* app/base/pixel-region.[ch]
* app/base/tile-manager.[ch]
* app/base/tile-swap.[ch]: removed code that tried to swap in
tiles asynchronously (but ended up calling up nothing).
2006-09-07 Sven Neumann <sven@gimp.org>
* configure.in: removed --enable_threaded_tile_swapper option.
* app/base/tile-cache.c
* app/base/tile-private.h
* app/base/tile-swap.c
* app/base/tile.c: removed threaded tile swapper code which has
been sitting here unused for too long.
2006-08-25 Sven Neumann <sven@gimp.org>
* configure.in: print the value of $datarootdir in the summary.
* app/base/tile-swap.c (tile_swap_in_attempt): fixed error
handling in this unused function.
2006-05-20 Manish Singh <yosh@gimp.org>
Fixes to address -ansi -pedantic compilation (bug #342390).
Thanks goes to Daniel Richard G. for noticing and suggesting
fixes.
* libgimpbase/gimpsignal.c: #include "config.h" and define
__POSIX_SOURCE for sigaction stuff.
* app/base/tile-swap.c (tile_swap_test): use more portable
S_IRUSR and S_IWUSR, instead of S_IREAD and S_IWRITE.
* plug-ins/common/ripple.c
* plug-ins/imagemap/imap_main.c: use C89 comments.
* plug-ins/Lighting/lighting_preview.h: don't define spin widget
variables here...
* plug-ins/Lighting/lighting_ui.[ch]: ... and instead take care
of them here.
2005-09-29 Sven Neumann <sven@gimp.org>
* app/base/tile-cache.c
* app/base/tile-manager.c
* app/base/tile-private.h
* app/base/tile-swap.c
* app/base/tile.c: keep the data size of a tile in the Tile struct
instead of recalculating it over and over again. Adds an overhead
of 4 bytes per tile but speeds up the tile cache significantly.
2005-07-30 Sven Neumann <sven@gimp.org>
* app/base/tile-swap.c: increase the size of the swap file in
chunks of 16MB instead of only 256KB. Check the return value of
ftruncate().
2005-03-23 Sven Neumann <sven@gimp.org>
* app/base/tile-swap.c (tile_swap_init): create the swap directory
if it doesn't exist. Will still fail if the parent directory is not
available. Still good enough to close bug #167506.
* app/app_procs.c: tweaked error message.
2005-02-19 Hans Breuer <hans@breuer.org>
* app/base/pixel-processor.c : TILE_WIDTH is used unconditionally
so always include "tile.h"
* app/base/tile-swap.c : WIN32 needs <process.h> for _getpid()
* app/dialogs/user-install-dialog.c : include gimpwin32-io.h
* libgimpbase/gimpwin32-io.h : there are no group or other
flags in msvcrt, define S_IGRP etc in terms of _S_IREAD etc
* plug-ins/script-fu/script-fu.c plug-ins/script-fu/siod-wrapper.c :
no script-fu server on win32, make respective function calls conditional
* libgimpconfig/makefile.msc : new file
* **/makefile.msc app/gimpcore.def : updated, gimp builds
and runs once more with ms toolchain
2005-02-13 Sven Neumann <sven@gimp.org>
* configure.in
* app/base/tile-cache.c
* app/base/tile-private.h
* app/base/tile-swap.c
* app/base/tile.c: in an attempt to safe this code from bit-rot,
ported the experimental threaded tile-swapper to gthread.
2005-02-13 Sven Neumann <sven@gimp.org>
* app/base/base.c
* app/base/tile-swap.[ch]: moved some code from base_init() into
tile_swap_init().
* app/base/pixel-processor.[ch]: prepared for porting to GThreadPool.
* app/config/gimpbaseconfig.c: changed "num-processors" option to
require a confirmation before being changed.
2004-11-22 Sven Neumann <sven@gimp.org>
* app/app_procs.c (app_exit_after_callback): call base_exit()
before quitting the application using exit(). Fixes bug #159019.
* app/base/tile-swap.c: moved the warning about a non-empty swap
file into #ifdef GIMP_UNSTABLE ... #endif.
2004-07-19 Michael Natterer <mitch@gimp.org>
* libgimpbase/gimpwin32-io.h: added copyright header, added
#defines for access(), F_OK, R_OK and X_OK.
* app/core/gimpdata.c: include the above instead of defining
the workarounds here.
* app/base/tile-swap.c
* app/config/gimpconfig-dump.c
* libgimpthumb/gimpthumb-utils.c
* libgimpthumb/gimpthumbnail.c: for consistency, #include
gimpwin32-io.h with "" instead of <>.
2004-06-13 Sven Neumann <sven@gimp.org>
* app/paint-funcs/paint-funcs.c (shapeburst_region): don't call
tile_ewidth() three times from the inner loop.
* app/base/tile-manager.c (tile_manager_get): don't call
tile_size() twice on the same tile.
* app/base/tile-private.h: added tile_size_inline(), an inline
version of the tile_size() function.
* app/base/tile-cache.c
* app/base/tile-manager.c
* app/base/tile-swap.c
* app/base/tile.c: use tile_size_inline() from inside the tile
subsystem.
2004-03-15 Simon Budig <simon@gimp.org>
* app/base/tile-swap.[ch]: Applied a modified version of a patch
from Raphaël, that implements a test if a swap file can be
created. Also make the failure message more verbose.
* app/base/base.[ch]: extend base_init() with a boolean return
to indicate if the test to create a swap file was OK.
* app/app_procs.c: Display a warning message at startup when the
test fails.
Fixes bug #64835.
2004-01-19 Sven Neumann <sven@gimp.org>
* app/*/*.c: include "libgimpbase/gimpbase.h" where needed; removed
now unnecessary inclusions of "file/file-utils.h".
2004-01-19 Sven Neumann <sven@gimp.org>
* app/file/file-utils.[ch]: removed file_utils_filename_to_utf8() ...
* libgimpbase/gimputils.[ch]: ... and added it here as
gimp_filename_to_utf8(). Added some docs that promise less than
the current implementation holds so that we can change the
implementation later.
* app/*/*.c: use gimp_filename_to_utf8() where
file_utils_filenames_to_utf8() has been used before.
* libgimpbase/gimpbase.def: changed accordingly.
* configure.in: reset GIMP_INTERFACE_AGE.
2004-01-14 Tor Lillqvist <tml@iki.fi>
* app/file/file-utils.[ch]: Add new function
file_utils_filename_to_utf8(), which is to be used when converting
file names (which are kept in the on-disk encoding) to UTF-8 for
passing to GTK, or to g_print() etc.
* app/*/*.c: Call file_utils_filename_to_utf8(). Should fix most
of the warnings generated by non-UTF8 pathnames. See #130118.
* libgimpbase/gimpenv.b: Document that gimp_directory() etc return
strings in the on-disk encoding.
* libgimpmodule/gimpmodule.c: Convert filenames to UTF-8 (using
g_filename_to_utf8()) before passing to g_print().
2003-07-26 Hans Breuer <hans@breuer.org>
* libgimp/gimpcompat.h : renamed GimpOrientationType
with Compat postfix to avoid name clashing when using
this header together with libgimp/gimpenums.h
* app/composite/makefile.msc : (new file)
**/makefile.msc : updated
* libgimp/gimp.c : use static defined _tile<widht|height>
in this file instead of function call
* libgimp/gimp.def libgimp/libgimpui.def : moved from former
to latter : gimp_<brush|font|gradient|pattern>_select_<new|destroy>
added to former gimp_<brushes|gradients|patterns>_popup
* app/paint/gimppaintcore.h : removed double semicolon
which gave msvc error C2059: syntax error : ';'
* libgimpbase/gimpwin32-io.h : (new file) compatibilty defines
which were spread over multiple files to make up mostly for
missing unistd.h
* app/base/tile-swap.c app/core/gimpimagefile.c
libgimpbase/gimpdatafiles.c
plug-ins/FractalExplorer/FractalExplorer.c : use new header
* plug-ins/gflare/gflare.c
plug-ins/flame/flame.c
plug-ins/FractalExplorer/Dialogs.c :
removed #ifdef G_OS_WIN32 special casing, not needed anymore
due to g_file_test() usage
* app/text/*.* : changes required for build with PangoWin32,
but not commited ...
2003-01-04 Sven Neumann <sven@gimp.org>
* app/base/tile-swap.c (tile_swap_find_offset): use off_t to
return the offset. Finally allows to handle swap files larger than
2 GB (fixes bug #74478).
2001-12-07 Sven Neumann <sven@gimp.org>
* app/core/gimpmarshal.[ch]: removed from CVS, they are generated.
* app/base/Makefile.am
* app/base/base-enums.h: new file defining enums that are to be
registered. Used to build app/base/base-enums.c.
* app/base/base-types.h: include base-enums.h.
* tools/pdbgen/Makefile.am
* tools/pdbgen/enumcode.pl
* tools/pdbgen/enums.pl: parse the new base-enums.h file and modified
the perl voodoo so it doesn't prefix enums with GIMP_ that are already
properly namespaced.
* app/core/core-types.h: don't need to chop GIMP from enum.
* app/pdb/color_cmds.c
* app/pdb/tools_cmds.c
* libgimp/gimpenums.h
* plug-ins/script-fu/script-fu-constants.c: regenerated.
* app/config/gimpconfig-deserialize.[ch]
* app/config/gimpconfig-serialize.[ch]
* app/config/gimpconfig.[ch]: made GimpConfig an interface including
a reasonable default implementation that works on object properties.
* app/config/Makefile.am
* app/config/gimpbaseconfig.[ch]: new GimpBaseConfig using the
GimpConfig interface. Yet only used for testing from app/main.c.
* app/main.c: test the new GimpBaseConfig object.
* app/gimprc.c
* app/base/base-config.h
* app/base/*.c
* app/core/gimpdatafiles.c
* app/core/gimpdrawable-transform.c
* app/core/gimppreviewcache.c
* app/gui/preferences-dialog.c
* app/paint-funcs/paint-funcs.c
* app/xcf/xcf-seek.c: need to include glib-object.h since base-config
contains registered enums now. Follow name change of InterpolationType
to GimpInterpolationType.
2001-05-15 Michael Natterer <mitch@gimp.org>
* configure.in: new directory app/base/
* app/Makefile.am
* app/boundary.[ch]
* app/brush_scale.[ch]
* app/gimpchecks.h
* app/gimplut.[ch]
* app/pixel_processor.[ch]
* app/pixel_region.[ch]
* app/pixel_surround.[ch]
* app/temp_buf.[ch]
* app/tile.[ch]
* app/tile_cache.[ch]
* app/tile_manager.[ch]
* app/tile_manager_pvt.h
* app/tile_pvt.h
* app/tile_swap.[ch]: moved to base/
* app/base/Makefile.am
* app/base/base-types.h
* app/base/*: new directory for the sub-object pixel maniplation
and storage stuff. Does not include Gtk+ or anything outside
base/. Did some cleanup in all files.
* app/appenums.h
* app/apptypes.h
* app/core/gimpimage.h: removed types which are now in
base/base-types.h.
* app/base/base-config.[ch]
* app/gimprc.[ch]: put the config variables for base/ to their own
file so base/ doesn not have to include gimprc.h (does not yet
work, i.e. the variables are un-configurable right now)
* app/main.c: set a log handler for "Gimp-Base".
* app/paint-funcs/Makefile.am
* app/paint-funcs/paint-funcs.[ch]: removed the color hash which
maps RGB to color indices because it's a totally standalone system
which has nothing to do with the paint-funcs and introduced a
GimpImage dependency.
paint-funcs/ should be considered on the same sub-object
(glib-only) level as base/, only in a different directory.
* app/core/Makefile.am
* app/core/gimpimage-colorhash.[ch]: put the color hash here.
* app/gimage.c: don't invalidate the color hash here...
* app/core/gimpimage.c: ... but in the colormap_changed() default
inplementation. Initialize the hash in class_init().
* tools/pdbgen/Makefile.am: scan app/base/base-types.h for enums.
* tools/pdbgen/enums.pl: regenerated.
* app/[lots]
* app/core/[of]
* app/gui/[files]
* app/pdb/[all]
* app/tools/[over]
* app/widgets/[the]
* tools/pdbgen/pdb/[place]: changed #includes accordingly. And use
base_config->value instead of the stuff from gimprc.h.
2000-12-29 Michael Natterer <mitch@gimp.org>
* app/Makefile.am
* app/channel_pvt.h
* app/drawable_pvt.h
* app/gdisplayF.h
* app/gimpdrawableP.h
* app/gimpimageP.h
* app/layer_pvt.h
* app/toolsF.h: removed these files.
* app/apptypes.h
* tools/pdbgen/enums.pl: added tons of opaque typedefs and enums.
* tools/pdbgen/pdb/brush_select.pdb
* tools/pdbgen/pdb/brushes.pdb
* tools/pdbgen/pdb/channel.pdb
* tools/pdbgen/pdb/color.pdb
* tools/pdbgen/pdb/convert.pdb
* tools/pdbgen/pdb/display.pdb
* tools/pdbgen/pdb/drawable.pdb
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/gradient_select.pdb
* tools/pdbgen/pdb/gradients.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/image.pdb
* tools/pdbgen/pdb/layer.pdb
* tools/pdbgen/pdb/pattern_select.pdb
* tools/pdbgen/pdb/patterns.pdb
* tools/pdbgen/pdb/selection.pdb
* tools/pdbgen/pdb/tools.pdb
* app/*: chainsaw #include cleanup:
- Never (never!!) include stuff in header files except where we
need access to structures' contents (like derived objects).
- Added prototypes and proper formating in many files.
- The #include order in *all* *.c files is as follows:
#include "config.h"
#include <system stuff>
#include <gtk/gtk.h>
#include "apptypes.h"
#include "gimp stuff"
#include "libgimp stuff"
#include "libgimp/gimpintl.h"
By following this scheme we can easily see a file's dependencies
from it's #include's and can grep for the inclusion to find out
where a file is used.
* tools/pdbgen/app.pl: changed to follow the include scheme above.
* libgimp/Makefile.am
* libgimp/gimpuitypes.h: new file, included from libgimp/gimpui.h
and from app/apptypes.h.
* libgimp/gimpcolorbutton.[ch]
* libgimp/gimpdialog.[ch]
* libgimp/gimphelpui.[ch]
* libgimp/gimpparasite.[ch]
* libgimp/gimppatheditor.[ch]
* libgimp/gimpprotocol.c
* libgimp/gimpquerybox.[ch]
* libgimp/gimpsizeentry.[ch]
* libgimp/gimptypes.h
* libgimp/gimpui.h
* libgimp/gimpunit.h
* libgimp/gimpunitmenu.[ch]
* libgimp/gimpwidgets.[ch]: changed accordingly.
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_default_dialog.c
* plug-ins/imagemap/imap_file.c: these files used to include
"libgimp/gimpui.h" without including "libgimp/gimp.h". This is
no longer possible because the libgimpui headers don't inlcude
"libgimp/gimpunit.h" any more.
Thu Jan 6 18:39:05 GMT 2000 Adam D. Moss <adam@gimp.org>
* app/tile_cache.c
* app/tile_swap.c: Maybe fixed tile_cache_set_size()
so that it actually works now. You can use this to set GIMP's
tile cache size at runtime without restarting. If the prefs
guys (Sven, Michael?) don't wire it in I'll look at it, but it
can't be soon.
* app/tile.c
* app/tile.h
* app/tile_manager.c
* app/tile_swap.c:
Allocate Tile's array of TileRowHints dynamically. Make type
of TileRowHint explicit since it's fairly space-critical.
Can save several hundred K of memory with this and struct
changes.
Added warnings for old basically-untested-or-insane
paths through the tile referencing code.
* app/tile_pvt.h: Shrink down and rearrange fields of Tile
struct to save some space with gcc's padding for most people.
* app/paint_funcs.c: Use tile_sanitize_rowhints() to ensure
that rowhints have been allocated before use.
* app/channel_ops.c
* app/gdisplay.c
* app/pixel_region.c: Cosmetic, sanity or unfinished debug
changes (the latter commented out) for fun and reference.
1999-10-25 Tor Lillqvist <tml@iki.fi>
* app/cursorutil.h: Uncomment the inclusion of gdkcursor.h that
should happen only with GTk+ 1.3, anyway? Why was it commented
out?
* app/tile_swap.c: Close before unlinking on Win32, too.
* libgimp/gimp.def: Updates, sorted.
* plug-ins/makefile.{cygwin,msc}: Add the gap and imagemap
plug-ins. Remove palette plug-in (what happened to it?).
Portability fixes from Hans Breuer:
* plug-ins/FractalExplorer/Dialogs.c
* plug-ins/gap/*.c:
* plug-ins/gimpressionist/gimpressionist.c:
* plug-ins/common/spheredesigner.c: Ifdefify system-dependent includes.
* plug-ins/common/psp.c: Remove an unused variable.
* plug-ins/imagemap/{imap_csim.y,imap_csim_parse.c}: Use
<string.h>, not <strings.h>.
* plug-ins/imagemap/imap_rectangle.c (rectangle_near_sash): Use
the & operator for function names to return pointers to them.
* plug-ins/winsnap/winsnap.c (sendBMPToGimp):
gimp_drawable_flush() should be called before resizing the layer
and image. Now the snapshot of a window is returned the correct
size, it's not padded in width to a multiple of four pixels.