[GRASS-SVN] r64627 - in grass/trunk/gui/wxpython: core mapwin
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 14 09:19:27 PST 2015
Author: martinl
Date: 2015-02-14 09:19:27 -0800 (Sat, 14 Feb 2015)
New Revision: 64627
Modified:
grass/trunk/gui/wxpython/core/render.py
grass/trunk/gui/wxpython/mapwin/buffered.py
Log:
wxGUI: debug message showing rendering speed fixed and moved to Map.Render()
Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py 2015-02-14 14:35:04 UTC (rev 64626)
+++ grass/trunk/gui/wxpython/core/render.py 2015-02-14 17:19:27 UTC (rev 64627)
@@ -34,6 +34,7 @@
import copy
import tempfile
import types
+import time
import wx
@@ -947,7 +948,8 @@
env['GRASS_RENDER_IMMEDIATE'] = 'png'
else:
env['GRASS_RENDER_IMMEDIATE'] = 'cairo'
-
+
+ start = time.time()
maps, masks, opacities = self.GetMapsMasksAndOpacities(force, windres, env)
# ugly hack for MSYS
@@ -967,7 +969,7 @@
# run g.pngcomp to get composite image
bgcolor = ':'.join(map(str, UserSettings.Get(group = 'display', key = 'bgcolor',
subkey = 'color')))
-
+ startComp = time.time()
if maps:
ret, msg = RunCommand('g.pnmcomp',
getErrorMsg = True,
@@ -986,8 +988,10 @@
wx.EndBusyCursor()
return None
- Debug.msg (3, "Map.Render() force=%s file=%s" % (force, self.mapfile))
-
+ stop = time.time()
+ Debug.msg (1, "Map.Render() force=%s -> time=%f (comp: %f)" % \
+ (force, stop - start, stop - startComp))
+
wx.EndBusyCursor()
if not maps:
return None
Modified: grass/trunk/gui/wxpython/mapwin/buffered.py
===================================================================
--- grass/trunk/gui/wxpython/mapwin/buffered.py 2015-02-14 14:35:04 UTC (rev 64626)
+++ grass/trunk/gui/wxpython/mapwin/buffered.py 2015-02-14 17:19:27 UTC (rev 64627)
@@ -808,7 +808,6 @@
"""
:func:`UpdateMap` for arguments description.
"""
- start = time.clock()
self.resize = False
# was if self.Map.cmdfile and ...
@@ -913,12 +912,10 @@
if len(self.polycoords) > 0:
self.DrawLines(self.pdcTmp)
-
- stop = time.clock()
-
- Debug.msg (1, "BufferedWindow.UpdateMap(): render=%s, renderVector=%s -> time=%g" % \
- (render, renderVector, (stop-start)))
-
+
+ Debug.msg (1, "BufferedWindow.UpdateMap(): render=%s, renderVector=%s" % \
+ (render, renderVector))
+
return True
def DrawCompRegionExtent(self):
More information about the grass-commit
mailing list