Re: SHAPEFILE changes in IDL7.1? [message #68806] |
Tue, 01 December 2009 16:25 |
Brian McNoldy
Messages: 35 Registered: July 2000
|
Member |
|
|
On Nov 30, 6:24 pm, David Fanning <n...@dfanning.com> wrote:
> Brian McNoldy writes:
>
>> I narrowed the problem down to the last line of the program:
>> "Heap_Free, entities".
>> (seehttp://www.dfanning.com/programs/drawstates.profor the full
>> program)
>> If I change that to "Ptr_Free, entities", all is well and the program
>> works like it used to: quickly. Something between v7.0 and v7.1 is
>> quite different when it comes to heap versus pointer cleaning!
>
> As I was walking back to my car this afternoon, thinking
> about this, it occurred to me that this problem could very well
> be connected to that Scope_VarFetch problem Wayne reported
> a week or so ago that slowed one of his programs down to
> a crawl. Have you by any chance installed the IDL 7.1.2
> patch that is available? I think that is the first thing
> I would try before I spent too much more time on this.
>
> Cheers,
>
> David
Looked into the 7.1.2 patch, and ITT responded that the patch is only
for Windows (Josh Elliott, Tech Support Engineer). So that doesn't
solve the issue in Linux unfortunately. For now, I'm still using
PTR_FREE instead of HEAP_FREE and things are at least working like
they used to!
|
|
|
Re: SHAPEFILE changes in IDL7.1? [message #68877 is a reply to message #68806] |
Mon, 30 November 2009 17:24  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian McNoldy writes:
.
> I narrowed the problem down to the last line of the program:
> "Heap_Free, entities".
> (see http://www.dfanning.com/programs/drawstates.pro for the full
> program)
> If I change that to "Ptr_Free, entities", all is well and the program
> works like it used to: quickly. Something between v7.0 and v7.1 is
> quite different when it comes to heap versus pointer cleaning!
As I was walking back to my car this afternoon, thinking
about this, it occurred to me that this problem could very well
be connected to that Scope_VarFetch problem Wayne reported
a week or so ago that slowed one of his programs down to
a crawl. Have you by any chance installed the IDL 7.1.2
patch that is available? I think that is the first thing
I would try before I spent too much more time on this.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: SHAPEFILE changes in IDL7.1? [message #68882 is a reply to message #68877] |
Mon, 30 November 2009 12:10  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian McNoldy wites:
> I narrowed the problem down to the last line of the program:
> "Heap_Free, entities".
> (see http://www.dfanning.com/programs/drawstates.pro for the full
> program)
> If I change that to "Ptr_Free, entities", all is well and the program
> works like it used to: quickly. Something between v7.0 and v7.1 is
> quite different when it comes to heap versus pointer cleaning!
Yikes! Except that you will be leaking memory like
a sieve! :-(
Good clue, though. I'll see what I can come up with tonight.
It may be we need a function that can pick structures
apart and free pointers and objects inside them recursively.
(The purpose of HEAP_FREE, alas.)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|
Re: SHAPEFILE changes in IDL7.1? [message #68883 is a reply to message #68882] |
Mon, 30 November 2009 11:44  |
Brian McNoldy
Messages: 35 Registered: July 2000
|
Member |
|
|
On Nov 30, 11:31 am, Brian McNoldy <mcno...@atmos.colostate.edu>
wrote:
> On Nov 30, 11:14 am, David Fanning <n...@dfanning.com> wrote:
>
>
>
>> Oh, oh. Sounds like they switched to the algorithm they
>> use in ENVI. :-(
>
>> I don't have time today to investigate, but I'll look into
>> it tonight. Can you give more details? Are you drawing this
>> on a map projection, etc.?
>
>> Cheers,
>> David
>
> I figured something changed in the heart of the language, because all
> other components were unchanged. I am not doing anything fancy with
> it, just drawing county lines (as an example... I also draw roads from
> another shapefile) on an existing map projection. The routine does
> end up doing what it's supposed to, but it takes unreasonably long --
> several minutes instead of a blink. Here is what I'm using (and have
> successfully used for years):
> drawstates,'COUNTIES.SHP',attribute_name='NAME',statenames=' ALL'
>
> Thanks in advance for looking into it!
> Brian
I narrowed the problem down to the last line of the program:
"Heap_Free, entities".
(see http://www.dfanning.com/programs/drawstates.pro for the full
program)
If I change that to "Ptr_Free, entities", all is well and the program
works like it used to: quickly. Something between v7.0 and v7.1 is
quite different when it comes to heap versus pointer cleaning!
|
|
|
Re: SHAPEFILE changes in IDL7.1? [message #68884 is a reply to message #68883] |
Mon, 30 November 2009 10:31  |
Brian McNoldy
Messages: 35 Registered: July 2000
|
Member |
|
|
On Nov 30, 11:14 am, David Fanning <n...@dfanning.com> wrote:
>
> Oh, oh. Sounds like they switched to the algorithm they
> use in ENVI. :-(
>
> I don't have time today to investigate, but I'll look into
> it tonight. Can you give more details? Are you drawing this
> on a map projection, etc.?
>
> Cheers,
> David
>
I figured something changed in the heart of the language, because all
other components were unchanged. I am not doing anything fancy with
it, just drawing county lines (as an example... I also draw roads from
another shapefile) on an existing map projection. The routine does
end up doing what it's supposed to, but it takes unreasonably long --
several minutes instead of a blink. Here is what I'm using (and have
successfully used for years):
drawstates,'COUNTIES.SHP',attribute_name='NAME',statenames=' ALL'
Thanks in advance for looking into it!
Brian
|
|
|
Re: SHAPEFILE changes in IDL7.1? [message #68886 is a reply to message #68884] |
Mon, 30 November 2009 10:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Brian McNoldy wites:
> I've been a happy user of David Fanning's DRAWSTATES routine for years
> -- it allows you to easily plot various datasets in a shapefile
> (states, counties, roads, lakes, etc from just about any shapefile you
> find online). I recently upgraded to v7.1 and although it still
> works, a basic call to it takes about 4 minutes instead of being
> virtually instantaneous. I'm wondering if anyone else has come across
> something like this. I'm on Linux (CentOS5) and using IDL 7.1... it
> was not an issue in 7.0 and earlier. Maybe it was a change in the
> DLM?
Oh, oh. Sounds like they switched to the algorithm they
use in ENVI. :-(
I don't have time today to investigate, but I'll look into
it tonight. Can you give more details? Are you drawing this
on a map projection, etc.?
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|