[Kstars-devel] Performance of KStars Lite

Jasem Mutlaq mutlaqja at ikarustech.com
Sun Jun 5 05:37:59 UTC 2016


Hi Artem,

sincos() is used in a few places and is indeed the most expensive
operation. It is also not cross-platform. I'm CCing Dr. Bowlin who is the
architect behind the SkyMesh and a lot of the drawing and optimization code
in KStars today. He is probably best to answer any questions on this topic.

Regards,
Jasem


On Sun, Jun 5, 2016 at 1:27 AM, Artem Fedoskin <afedoskin3 at gmail.com> wrote:

> Dear developers of KStars,
>
> While porting lines (Equator, EquatorialCoordinateGrid,
> HorizontalCoordinateGrid,
> ConstellationLines etc.) I noticed that performance of Android version
> fell down pretty significant. Profiler shows that sincos is called a lot
> and at least on my tablet this causes very laggy slewing.
> I thought that we could use SkyMesh to see what lines have to be updated
> and call toScreenVec accordingly but it turns out that SkyMesh doesn't
> always return visible Trixels correctly. I'm doing the following:
>
>    1. Call SkyMesh::aperture(focus, radius)
>    2. Iterate over visible trixels with MeshIterator region (mesh,DRAW_BUF
>    );
>
> On minimum zoom when the whole half sphere is visible I get all 512
> trixels. I thought that in this case it has to be around 256 trixels.
> Also when I don't draw lines based on what trixels are visible, some of
> lines in visible area are not drawn. Is it a normal behavior or a bug?
>
> Is it possible to minimize the number of calls to Projector::toScreenVec()?
> Can we modify Projector::checkVisibility() so that we don't call
> toScreenVec() if we now that the SkyPoint is not visible?
>
> I committed all the changes so feel free to test them on your device and
> measure the performance. Also, if someone has experience with shaders I
> would appreciate helping me as Qt Quick Scene Graph doesn't support drawing
> dashed lines out of a box and I would like to use shaders for that but
> have a few questions.
>
> Regards, Artem
>
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel
>
>


-- 
Best Regards,
Jasem Mutlaq
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20160605/ee72bb16/attachment-0001.html>


More information about the Kstars-devel mailing list