comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much? [message #64997 is a reply to message #64996] Fri, 06 February 2009 12:16 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bernat writes:

> I had an application writted using direct graphics and I converted it
> to object graphics. I prefer object graphics because the fonts and all
> the interaction (in general) are better
> The problem is, for example, when I convert a loop like this:
>
> plot, x, y
> For i=0, 1500 Do oplot, x2[i,*], y2[i,*]
>
> For this example I use 1500 IDLgrPlot objects and I save all of that
> in an IDLgrModel.
> Now I'm asking if it's correct to save all of this references in
> memory.
> Maybe this a crazy question....

Well, if you want to redraw the plot (maybe you resized the
window or something), then you are either going to have to
have all these objects available, or you are going to have
to re-create them. (By the way, I think I would have used
polylines rather than plots, but I don't know if one is
better than the other or not.)

> I used the IDLgrBuffer for convert all of that to an IDLgrImage. So, I
> only have 1 object in memory.

If your application allows this (not much interactivity, I guess)
then what the heck, destroy all those overplot objects. You
aren't going to use them anyway.

> The other question was how to know how much memory is an object
> taken...

I don't know. Objects are implemented as named structures, so...
Some overhead, I guess, but not that much. I suppose there much
be a place where the overhead of storage has to be balanced against
the time needed to create and destroy all these objects. Hard to
say if 1500 is the limit. What kind of performance to you get
if you have to re-draw?

> What do you think about that David ?

I think unless you are throwing this plot onto the screen
of your local movie theater, that plot is going to be damned
hard to read! :-)

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to define resolution (not dimension!) for IDLanRoi->computeMask
Next Topic: Nice Fonts in Direct Graphics

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 17:22:31 PDT 2025

Total time taken to generate the page: 1.19935 seconds