Added DeepSkyObject class. There are now 3 subclasses of SkyObject
(StarObject, DeepSkyObject and KSPlanetBase). The goal is to reduce
memory usage by making SkyObject and StarObject as small as possible
(since there are 10 times as many stars as anything else). Data that has
been moved from SkyObject to DeepSkyObject includes: the Image, angular
size, position angle, and PGC and UGC ID numbers (which are galaxy
In SkyObject, the Type value is stored internally as an "unsigned char"
rather than an int (but the interfaces setType() and type() still use
int). Similarly, the magnitude is a float rather than a double.
In DeepSkyObject, the catalog (messier/ngc/ic/custom) is now
specified with an enum rather than a QString.
Before these changes, KStars used 126 MB of RAM with the full star catalog
to 9th magnitude loaded (~130,000 stars). It now uses 106 MB. I'd like
to try to reduce this further, but I am unsure what else to do. One idea
is to store the object names (Name, Name2, and LongName) using 'const
char*' instead of QString. Another idea is to trim SkyPoint (from which
SkyObject is derived). SkyPoint currently stores 8 dms objects (catalog
RA, Dec; current RA, Dec; Az, Alt; and Galactic long, lat). I think we
can at least get rid of Galactic long/lat and simply compute those values
on-demand. Any other thoughts?
svn path=/trunk/kdeedu/kstars/; revision=245336
20 files changed: