[Kstars-devel] Binary star data loading accomplished in Branch!

Akarsh Simha akarshsimha at gmail.com
Mon Jun 2 20:51:27 CEST 2008


Hi James,

> Good work.  Congratulations.  As the saying goes, now you have your foot 
> in the door.

Thanks

> 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?

I'm still using explicit StarObject constructors. I'll try and see if
I can eliminate that tomorrow. I'll need to analyze the StarObject
constructor and see if it does any memory allocations. We'll have to
take care of those too, if it does any.

> 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.

Wow! That will be challenging. Should take up the whole of this week
and part of the next! :D

> 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).

Okay.

> 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.

Yes, I'm dealing with star names. I could re-implement it that way,
too. But I don't clearly understand what we are going to gain out of
this. Would help if you could elaborate on this.

Thanks

Regards
Akarsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20080603/b1882ca6/attachment.pgp 


More information about the Kstars-devel mailing list