[Kstars-devel] Re: kdeedu/kstars/kstars

Pablo de Vicente p.devicente at wanadoo.es
Thu May 20 07:40:48 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

El Jueves, 20 de Mayo de 2004 09:43, Jason Harris escribió:
> Hello,
>
> > I have added to the SkyPoint class two private members which
> > are the ecliptic longitude and latitude. I have also added
> > functions to retrieve these values and to set them.
>
> I am a little concerned about this.  KStars stores tens of thousands of
> SkyPoints in memory, so adding members to this class can really impact
> heavily on the memory usage.  Are the Ecliptic coordinates used often
> enough to justify the addition?
>
> As a test, I used 'top' to estimate the memory usage both before and
> after Pablo's commit:
>
> before:  Virt: 135  Res: 122  Shr: 30
> after:   Virt: 145  Res: 132  Shr: 30
>
> What do you guys think?  Is it worth 10 MB of memory usage?
>
> regards,
> Jason

Hello Jason,

No, it is not. I may change this to use the functions setFromEcliptic() and 
findEcliptic() and remove the private members and the EclipticToEquatorial() 
and EquatorialToEcliptic() from SkyPoint class. 

Furthermore, I may do the same thing for the Galactic coordinates and we will 
possibly reduce the memory footprint by another 10 MB. The galactic 
coordinates are not used frequently and we may modify EquatorialToGalactic() 
and GalacticToEquatorial() so that the coordinates are computed online and 
not stored on private members. I will study how to do this.

On the other hand it is a pity because the other solution was, IMHO, 
aesthatecially better, although we paid a memory penalty, but again, it is 
not worth using it.

regards,

Pablo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFArETqSItUpHl6kJERAozxAKCcAZ1w8e/SCttZJu1qt+3sCKPOpACfejnj
ELjerWPl1hGgIAruy2diwkg=
=G3bm
-----END PGP SIGNATURE-----


More information about the Kstars-devel mailing list