Gentlemen and ladies,

I am not sure if this will help but I have done some minor work in
IDRISI and if you can avoid the 'temp' table creation and write to a
user definable named table(s) do it.  Simply use enough table names to
allow for the kind of operation you are doing, e.g. - if you have to go
back to a previous step to grab the values from a field in a table to
use as variables in a calculation.  Then simply reuse these names over
and over again.  This cuts down on the disk space for temp files.  As we
all know, the more disk space taken up on a machine and the more
fragmented the disk gets the slower it runs.  This may eleviate the
problem.

Stan Johnston
Geologist

Martin Roundill wrote:
> 
> Scott,
> 
> I have found that you can speed up mapbasic/mapinfo by regularly closing and
> opening the base tables that you use (don't ask me why)  If you find that
> the process is reasonably quick but then begins to slow down then the
> following steps will dramatically help.
> 
> Keep a count of the number of queries you run and then every 100 or so close
> the table and reopen it.  If you are stepping through a table and running a
> query on the same table then use the fetch rec X command rather than fetch
> first, fetch next and each time X is divisible by 100 (eg X mod 100 = 0)
> then close the table and reopen it.
> 
> Hope this helps (don't forget to issue the command 'set table mytable
> fastedit on undo off' before doing the updates as this will definitely speed
> things up)
> 
> Cheers
> 
> Martin
> ==================================
> Martin Roundill
> GIS Manager
> Waitakere City Council
> Private Bag 93109
> Henderson
> Waitakere City
> New Zealand
> 
> -----Original Message-----
> From: Scott Fagg [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 27 April 2000 11:42
> To: [EMAIL PROTECTED]
> Subject: MI Speeding up mapbasic code
> 
> I have a piece of mapbasic code that process a road network removing
> redundant nodes and links, leading to a substantially smaller map in terms
> of number of objects. This we then feed into a transport model (Emme/2)
> 
> My problem is that the large size of the network (9000 nodes, 9000 links)
> leads to very long run times for my process, ranging from 5 to 12 hours.
> 
> The code is not especially complex but makes use of a lot of queries. Each
> iteration (one per node) involves probably at least 5 queries. I discovered
> the hardway that after mapinfo has processed 10000 queries, it hangs, having
> run out of available temp file names. I've resolved this by periodically
> closing all temp files from within my code.
> 
> Are there any guidelines for optimising mapinfo code to extract more
> performance from it?
> 
> Turning indexing on and off and had very little effect.
> 
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to