[Kstars-devel] Drawing deepsky objects on the fly

Victor Carbune victor.carbune at gmail.com
Sat Jun 19 17:29:32 CEST 2010


Hello,

Since the deep sky objects database will have a lot of data added, I
have been discussing with Akarsh on a method of optimising the way
they are accessed.
The optimisation would be doing something similar as it's done with the stars.

1. The objects will be initially painted on the sky, but no hash
between names and pointers to the object will exist (less memory used,
specially when the catalog will have a lot of other objects).

2. If one searches for an object (in the search dialog - you may see
it under tools, in my branch), then, instead of keeping the list of
DeepSkyObject * in the trixel (which might be impossible) the backend
would query the database (with the id of the object) and retrieve all
its parameters.
Further, a new instance of the DeepSkyObject is created, with the
parameters of the object, and the draw method is called again (maybe
not all the deep sky objects will be painted from the beginning) and
the object is centered using the SkyMap focus method. This means
combining the old method with the database.

3. If one right clicks on the sky, then the methods objectsInArea,
nearestObject etc. will be using a query on the database to retrieve
the object with the coordinates matching the point coords clicked by
the user and the process follows similarly as above (if the instance
is still created on point 2), then maybe we will still hold a hash map
only for clicked and searched objects).

I remember that Akarsh told me to avoid using hashmaps at all and
these might be avoided without the user to notify any changes at all
(just doing the query trick all the time).

Please let me know what you think.

Victor


More information about the Kstars-devel mailing list