[Kstars-devel] Binary star data loading accomplished in Branch!
James Bowlin
bowlin at mindspring.com
Mon Jun 2 20:43:35 CEST 2008
On Mon June 2 2008, Akarsh Simha wrote:
> And This is from the branch!!!
> ------------------------------
> kstars(9469) StarComponent::readData: Loaded 41560 stars in 1747
> ms
Good work. Congratulations. As the saying goes, now you have your foot
in the door.
If I did the arithmetic correctly, the above numbers come to 42
microseconds per star. it would be great if we could eventually cut
this down to 20 or even 10 microseconds. Do you see any easy ways to
make it go faster? For example, are you still using explicit
StarObject constructors?
One of the next steps might be to create a StarBlock for each trixel
and load the stars directly into the StarBlock without using
constructors. This will start to mimic how we will load stars
dynamically.
A StarBlock should probably be created with a single parameter in the
constructor, maxNumStars, specifying the number of stars in the
StarBlock. The StarBlock will be constructed normally but it will
contain a pointer to StarObject that will point to a block of memory we
malloc() to have enough room to contain maxNumStars StarObjects.
The StarBlock itself will contain other "book-keeping" fields such as
numStars (the actual number of stars in the StarBlock).
Are you dealing with star names? I think it is fine to ignore them
for now. But if you are dealing with names it might be good to load
the entire starnames file into memory to avoid extra seeks while loading
stars. Once the stars are loaded, the memory for the names can be
freed.
--
Peace, James
More information about the Kstars-devel
mailing list