Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much? [message #64979] |
Fri, 06 February 2009 21:32  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
bernat writes:
> Ahora estoy como al principio (I know u undertand spanish David :P)
S�, pero yo entienda solamente un poco. :-)
> Have we the same oppinion when I say that object graphics have a
> better look-and-feel (looks more nice) than Direct Graphics ?
Yes, we are in absolute agreement about this.
> The most important difference between my application (in
> ObjectGraphics) and the last application version (in Direct Graphics)
> is the appearence of the fonts.
Yes, but is a lot of work for fonts, verdad? :-)
> But.... maybe there is a way to represents a nice Fonts using Direct
> Graphics and all of my work was for nothing (useless).
Very few ways to get nice fonts using direct graphics
in display windows. But I get great looking viewgraphs,
etc., now that I know how to use ImageMagik to turn
PostScript files into PDF or PNG files. :-)
See, for example, the PS_START/PS_END programs on my web page.
Cheers,
David
P.S. Donde vive usted? Quisiera visitarle. Comprar� la cerveza. :-)
--
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: 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   |
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.")
|
|
|
Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much? [message #64998 is a reply to message #64997] |
Fri, 06 February 2009 12:08   |
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.")
|
|
|
Re: How to know how much memory (in Mb) takes an object ? 1700 on memory grObjects is too much? [message #64999 is a reply to message #64998] |
Fri, 06 February 2009 11:42   |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
Ok,
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....
I used the IDLgrBuffer for convert all of that to an IDLgrImage. So, I
only have 1 object in memory.
The other question was how to know how much memory is an object
taken...
What do you think about that David ?
Thanks,
Bernat
|
|
|
|
|
|