Re: Cache complex list for faster performance
- From: Stephan Kuhagen <skuhagen@xxxxxx>
- Date: Sun, 29 Jul 2007 12:25:22 +0200
Kevin Walzer wrote:
The key variable in question here is "portlist." That's the final list
that is dumped into the tablelist widget. How can I store/cache the
entire contents of $portlist so that I can parse/query it as needed? If
it's feasible to do this as a global variable, I haven't figured out how
to do it--trying later to find "portlist" only returns the first item of
the list. The list has about 4,000 items in it, each line of the list
structured as {$myinstalled $program $version $searchcategory}.
In this line
set portlist [list $myinstalled $program $version $searchcategory]
you set the portlist always to a new value. If you want to save/cache the
results, you should append to portlist, otherwise you overwrite your
previous settings. Maybe, you mean something like
lappend portlist [list $myinstalled $program $version $searchcategory]
But then you have to change the next line also to
.t.right.upper.frame.listbox insert end [lindex $portlist end]
otherwise you would insert the whole (growing) list into your widget.
HTH
Stephan
.
- Follow-Ups:
- Re: Cache complex list for faster performance
- From: Kevin Walzer
- Re: Cache complex list for faster performance
- References:
- Cache complex list for faster performance
- From: Kevin Walzer
- Cache complex list for faster performance
- Prev by Date: Re: Newbie Tcl Question
- Next by Date: Re: using configure
- Previous by thread: Cache complex list for faster performance
- Next by thread: Re: Cache complex list for faster performance
- Index(es):