lp:~stellarium/stellarium/comet-speedup

Created by gzotti and last modified

GZ:
Increase rendering speed for comets. If people just load "all" comet elements from MPC, tails computation for 700+ comets was too demanding.

DONE: Exclude/ignore tails if shorter than 0.0025AU. (about 375000km, earth-moon distance)
              Update: now tails ignored if shorter than coma diameter.
DONE: compute geometry only periodically, remove too many computations from draw().
DONE: Limit computation for comets on elliptical orbits to one period around perihel.

Up to here framerate increase on my system was 4->13fps. On dates where fewer comets are active (just go back 4 years), about 60fps. So, comets stay expensive. What else can be done?

Hah ---> That one was not done yet???
DONE: check before drawing if object is even bright enough (That was the killer :-P Now I see 78 fps or so.

I tried Fabien's speedup. At this point, framerate dropped slightly due to that test now being overhead (75fps or so), so I did not commit that.

DONE: Made some arrays and the textures static. (No big speed improvement)

DONE: Alex proposed looking for speedup for asteroids. After loading NEA list (11000 objects), framerate dropped indeed 80->4. With some trickery I could increase to 12fps or so: Make deltaJD depend on observer distance, and again, exit from draw() if not bright enough...

I think we can consider merging after some cleanup.

Georg

Get this branch:
bzr branch lp:~stellarium/stellarium/comet-speedup
Members of Stellarium can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Stellarium
Project:
Stellarium
Status:
Merged

Recent revisions

6947. By gzotti

Significant increase of framerate in case of many asteroids loaded:
(1) adaptive deltaJD, depends on distance.
(2) don't bother drawing if magnitude too dim.

6946. By gzotti

change asteroid magnitude computation to float (model is not accurate anyway)

6945. By gzotti

add tail length and coma diameter to comet infostring
tail texture coordinate and indices now shared static arrays.

6944. By gzotti

Return early in Comet::draw() when too dim (oops ;-) Now back at 78fps :-))

6943. By gzotti

reduce orbit_good for comets on elliptical orbit to one half orbital period before/after perihel (but max of 1000 days remain).

6942. By gzotti

Considerable speedup for people with hundreds of simultaneously active comets: Tail geometry only computed and rendered if tail is long enough. Some parts moved from draw() to precomputation. Framerate increased 4->13fps.

6941. By Alexander Wolf

Let's try avoid ugly font rendering on Windows.

6940. By Alexander Wolf

Updated default config.ini

6939. By Alexander Wolf

updated part of code, related to ecliptic coordinates

6938. By Alexander Wolf

Improvement auto selection of landscapes for planets and add fix to getting visual magnitude of planets in scripts.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:stellarium
This branch contains Public information 
Everyone can see this information.

Subscribers