diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index a2901741adbf465eb46f853fe71124a0c9e70a78..33f2e42ac4960f3a2d0cb5889b5510374b264f9d 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -59,7 +59,7 @@ static bool const HAS_BROKEN_MOTION_HINTS = true; //#define DEBUG_REDRAW 1; // Define this to output the time spent in a full idle loop and the number of "tiles" painted -//#define DEBUG_PERFORMANCE 1; +#define DEBUG_PERFORMANCE 1; // Tiles are a way to minimize the number of redraws, eliminating too small redraws. // The canvas stores a 2D array of ints, each representing a TILE_SIZExTILE_SIZE pixels tile. @@ -2228,7 +2228,14 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1) if (_rendermode != Inkscape::RENDERMODE_OUTLINE) { // use 256K as a compromise to not slow down gradients // 256K is the cached buffer and we need 4 channels - setup.max_pixels = 65536 * tile_multiplier; // 256K/4 + //setup.max_pixels = 65536 * tile_multiplier; // 256K/4 + double factor = 5.0; + if (allocation.width < 1500) { + factor = 3.0; + } else if(allocation.width < 2600) { + factor = 4.0; + } + setup.max_pixels = allocation.width * allocation.height / factor; } else { // paths only, so 1M works faster // 1M is the cached buffer and we need 4 channels diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index cd9396e9819b5dd605aa83f86be3154d05525621..cd59645900019e388f6a05c0bcc92ed91cef286d 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -2009,9 +2009,9 @@ void InkscapePreferences::initPageRendering() _page_rendering.add_line( false, _("Rendering _cache size:"), _rendering_cache_size, C_("mebibyte (2^20 bytes) abbreviation","MiB"), _("Set the amount of memory per document which can be used to store rendered parts of the drawing for later reuse; set to zero to disable caching"), false); // rendering tile multiplier - _rendering_tile_multiplier.init("/options/rendering/tile-multiplier", 1.0, 512.0, 1.0, 16.0, 16.0, true, false); - _page_rendering.add_line( false, _("Rendering tile multiplier:"), _rendering_tile_multiplier, "", - _("On modern hardware, increasing this value (default is 16) can help to get a better performance when there are large areas with filtered objects (this includes blur and blend modes) in your drawing. Decrease the value to make zooming and panning in relevant areas faster on low-end hardware in drawings with few or no filters."), false); + //_rendering_tile_multiplier.init("/options/rendering/tile-multiplier", 1.0, 512.0, 1.0, 16.0, 16.0, true, false); + //_page_rendering.add_line( false, _("Rendering tile multiplier:"), _rendering_tile_multiplier, "", + // _("On modern hardware, increasing this value (default is 16) can help to get a better performance when there are large areas with filtered objects (this includes blur and blend modes) in your drawing. Decrease the value to make zooming and panning in relevant areas faster on low-end hardware in drawings with few or no filters."), false); // rendering xray radius _rendering_xray_radius.init("/options/rendering/xray-radius", 1.0, 1500.0, 1.0, 100.0, 100.0, true, false);