[GRASS-dev] Issues of 6.5 build on WinXP

Michael Barton michael.barton at asu.edu
Sat Jan 2 00:10:20 EST 2010



On Jan 1, 2010, at 2:20 PM, Glynn Clements wrote:

> 
> Michael Barton wrote:
> 
>>>> Where is the EVT_TEXT binding? I couldn't find it.
>>> 
>>> It's in cmdPanel.__init__() ;)
>>> 
>>> In r40168 (trunk), it's at line 1329 of menuform.py.
>> 
>> If I comment out this line, I don't see any difference in function. 
> 
> 1. Run "d.vect --ui"
> 
> 2. Type the name of an existing vector map into the "map" field ("Name
> of input vector map").
> 
> 3. Switch to the Colors tab.
> 
> 4. Look at the "rgb_column" combo box ("Name of color definition
> column"). Likewise for "wcolumn" ("Lines" tab), "size_column" and
> "rot_column" ("Symbols" tab), and "attrcol" ("Labels" tab).
> 
> With that line uncommented, the combo boxes' popup menus list the
> columns of database table associated with the map. If it's commented
> out, the popup menus will be empty and the buttons will be greyed out.
> 
>> Does that help the time lag?
> 
> Yes.

I've tried to follow this all out. As it is currently written, it is not easily fixable. As best I can tell, OnUpdateSelection (called with every key press) sends the window ID to a threaded routine, which then uses the ID to grab what has been entered after each keypress and send that to another thread-related routine that populates the dictionary for the vector map with its database connections, layers, and columns for each related attribute table. This happens after each keypress. Of course, for most keypresses, there is no valid vector map and the attempt to create a dictionary fails. There may be a try/except somewhere to catch this, but I didn't see it. Probably this is where most of the slowness is. It doesn't seem to slow down my Mac more than a blink. But, the more columns there are, probably the more it drags. Also, the size of the vector might slow it down too. 

Anyway, I can't see an easy way to turn off this check on each keypress the way it is now because it must get the ID of the widget that contains a map name for the update to work. It seems to me that i more straightforward way to accomplish might be to simply have each keypress build a mapname in a variable [e.g., vecname]. Whenever a combobox that needs associated columns, layers, or db connections is clicked, it runs gselect.ColumnSelect.InsertColumns(vector=[vecname]) to refresh its values. This might lag a bit when the combobox is opened. But a check could be made to see if [vecname] has changed and skip the refresh if it has not. This would confine a lag to the first time open. To do this would require a fair amount of rewriting.

Michael



More information about the grass-dev mailing list