lp:~stellarium/stellarium/comet-speedup
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)
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
Branch merges
- Alexander Wolf: Approve (code)
- Fabien Chéreau: Pending requested
-
Diff: 810 lines (+293/-132)9 files modifiedplugins/SolarSystemEditor/src/SolarSystemEditor.cpp (+16/-3)
src/core/modules/Comet.cpp (+166/-74)
src/core/modules/Comet.hpp (+26/-10)
src/core/modules/MinorPlanet.cpp (+41/-18)
src/core/modules/MinorPlanet.hpp (+3/-2)
src/core/modules/Orbit.hpp (+1/-1)
src/core/modules/Planet.cpp (+32/-22)
src/core/modules/Planet.hpp (+2/-2)
src/core/modules/SolarSystem.cpp (+6/-0)
Related bugs
Bug #1350418: Framerate decreases if importing mpc data | High | Fix Released |
Related blueprints
Branch information
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. - 6945. By gzotti
-
add tail length and coma diameter to comet infostring
tail texture coordinate and indices now shared static arrays. - 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.
- 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