<div dir="ltr">Hi Artem,<div><br></div><div>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.</div><div><br></div><div>Regards,</div><div>Jasem</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 5, 2016 at 1:27 AM, Artem Fedoskin <span dir="ltr"><<a href="mailto:afedoskin3@gmail.com" target="_blank">afedoskin3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Dear developers of <span style="background:yellow none repeat scroll 0% 0%">KStars</span>,<br><br></div>While porting lines (Equator, <span style="background:yellow none repeat scroll 0% 0%">EquatorialCoordinateGrid</span>, <span style="background:yellow none repeat scroll 0% 0%">HorizontalCoordinateGrid</span>,
<br>
<span style="background:yellow none repeat scroll 0% 0%">ConstellationLines</span> etc.) I noticed that performance of Android version fell down pretty significant. <span style="background:yellow none repeat scroll 0% 0%">Profiler</span> shows that <span style="background:yellow none repeat scroll 0% 0%">sincos</span> is called a lot and at least on my tablet this causes very <span style="background:yellow none repeat scroll 0% 0%">laggy</span> slewing.<br></div>I thought that we could use <span style="background:yellow none repeat scroll 0% 0%">SkyMesh</span> to see what lines have to be updated and call <span style="background:yellow none repeat scroll 0% 0%">toScreenVec</span> accordingly but it turns out that <span style="background:yellow none repeat scroll 0% 0%">SkyMesh</span> doesn't always return visible <span style="background:yellow none repeat scroll 0% 0%">Trixels</span> correctly. I'm doing the following:<br></div><ol><li>Call <span style="background:yellow none repeat scroll 0% 0%">SkyMesh</span>::aperture(focus, radius)</li><li>Iterate over visible <span style="background:yellow none repeat scroll 0% 0%">trixels</span> with <span style="background:yellow none repeat scroll 0% 0%">MeshIterator</span> region (mesh,DRAW_<span style="background:yellow none repeat scroll 0% 0%">BUF</span>);</li></ol><p>On minimum zoom when the whole half sphere is visible I get all 512 <span style="background:yellow none repeat scroll 0% 0%">trixels</span>. I thought that in this case it has to be around 256 <span style="background:yellow none repeat scroll 0% 0%">trixels</span>. Also when I don't draw lines based on what <span style="background:yellow none repeat scroll 0% 0%">trixels</span> are visible, some of lines in visible area are not drawn. Is it a normal behavior or a bug?<br></p><p>Is it possible to minimize the number of calls to Projector::<span style="background:yellow none repeat scroll 0% 0%">toScreenVec</span>()? Can we modify Projector::<span style="background:yellow none repeat scroll 0% 0%">checkVisibility</span>() so that we don't call <span style="background:yellow none repeat scroll 0% 0%">toScreenVec</span>() if we now that the <span style="background:yellow none repeat scroll 0% 0%">SkyPoint</span> is not visible?</p><p>I committed all the changes so feel free to test them on your device and measure the performance. Also, if someone has experience with <span style="background:yellow none repeat scroll 0% 0%">shaders</span> 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 <span style="background:yellow none repeat scroll 0% 0%">shaders</span> for that but have a few questions.</p><p>Regards, <span style="background:yellow none repeat scroll 0% 0%">Artem</span><br></p></div>
<br>_______________________________________________<br>
Kstars-devel mailing list<br>
<a href="mailto:Kstars-devel@kde.org">Kstars-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kstars-devel" rel="noreferrer" target="_blank">https://mail.kde.org/mailman/listinfo/kstars-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best Regards,<br>Jasem Mutlaq<br></div><div><br></div></div></div>
</div>