Loading huge ssc files

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Loading huge ssc files

Post #1by Malenfant » 30.05.2006, 03:54

Just out of curiosity, I tried loading the huge mainbeltasteroids.ssc file at the motherlode, that contains all 230,000 main belt asteroids.

http://celestiamotherlode.net/creators/ ... ds.ssc.zip

First, without any extras loading at all, Celestia takes up 52.3MB of memory according to Task Manager.

Naturally my computer completely failed to load up the whole file in Celestia 1.4.1. But I noticed when I gave up after about 10-15 minutes of letting the CPU chug away that Task Manager said it was still loading up and taking up 150MB of memory and counting... (so how does the memory allocation work? It seems that it doesn't just allocate 94MB to loading the file to memory, but it didn't seem to want to stop allocating memory... should I have just left it for an hour or so?!)

So I tried to cull the file by removing all the asteroids labeled J-something or K-something, so there was now just the asteroids numbered from 00001 to 99999. That dropped it down to 39.9MB, but that didn't load up either (I gave up when it hit 100MB of memory and still rising). Cut it down to 49999 (about 18MB of ssc file), still it's going on and on up to and beyond 100MB of memory after several minutes of chugging away.

I cut it down to 10,000 asteroids (a mere 3.8MB ssc file) and finally it could finish loading up. But looking at how it loaded into memory I noticed that it loaded the initial default sscs very quickly (in a couple of seconds) then spent about 30 seconds stuck on the abridged mainbelt.ssc file, then a couple of seconds loading everything else up, making the screen and creating the graphics and finally opening the program. It ended up taking up 100MB of memory, total loading time of about 40 seconds.

Seems to me that it just slows down horribly when reading large ssc files - even 4MB (which isn't all that big a file really) grinds the loadup process to a halt for a bit. And even loading up the 10k asteroid file, Celestia ran like a dog when I told it to view asteroid orbits.

I guess this is unavoidable without rewriting Celestia's code, but I just thought it was interesting to see where the bottlenecks are. My computer isn't horrifically slow either, it's an Athlon XP 2100+ with 1GB of RAM and a 256MB NVidia Geforce FX5500 card running XP Pro.

There's no real way to trim the ssc file either, short of massively culling the number of asteroids - they've each got pretty much the barest minimum of information to allow them to be shown in Celestia.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #2by cartrite » 30.05.2006, 07:01

Malenfant wrote:
Naturally my computer completely failed to load up the whole file in Celestia 1.4.1. But I noticed when I gave up after about 10-15 minutes of letting the CPU chug away that Task Manager said it was still loading up and taking up 150MB of memory and counting... (so how does the memory allocation work? It seems that it doesn't just allocate 94MB to loading the file to memory, but it didn't seem to want to stop allocating memory... should I have just left it for an hour or so?!


When you say you gave up, you mean that you killed the process and the splash screen dissappeared? I just tried this with KDE and Gnome. I didn't let it go that long but tried to kill the process on my first try. I used KDE system guard and hit the kill button but Celestia kept loading. I logged out to finnaly kill it. Then I tried with KDE and the same thing happened. But this time I remembered that a popup comes up to ask for conformation. It's default answer is yes so I hit enter. Problem is I was never able to see it. It was covered by the splash screen.
I think windows also asks for conformation. That file is too big and I don't want to full with it any more. Good Luck.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

steffens
Posts: 162
Joined: 06.11.2003
With us: 21 years
Location: RP Germany

Post #3by steffens » 30.05.2006, 07:09

The problem here is probably not the filesize - the file could be read in small blocks - but every asteroid that was read from the file has to be stored in some kind of data structure.
I don't have the Celestia sourcecode here right now to have a look at what information is stored for each asteroid, but I guess that it is more than what is written in the ssc file.

steffens

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #4by Malenfant » 30.05.2006, 14:19

cartrite wrote:When you say you gave up, you mean that you killed the process and the splash screen dissappeared?


Yep. I don't know of any popup window that comes up for confirmation (of what? that you're trying to kill it?) - maybe that's something linux does differently to Windows. I'll have another crack at it tonight though to check.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #5by Rassilon » 30.05.2006, 15:27

I had the same problem when I was creating the star cluster generator... Break it up into smaller files and it should load up fine...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #6by Malenfant » 30.05.2006, 16:15

Rassilon wrote:I had the same problem when I was creating the star cluster generator... Break it up into smaller files and it should load up fine...


So I could theoretically split the 94MB file into thirty or so 3 MB files and it'd be able to load them up (it'd explode when I turned on asteroid orbits though ;)). At least I guess I'd be able to see at what stage of the process it's at when it's loading them. Or would it still take forever to load it?

I guess a binary format for the asteroid belt file would load quicker too?

I'm just curious as to what the entire asteroid belt would look like ;)
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Avatar
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #7by cartrite » 30.05.2006, 17:20

I had a quick look at the top of this file in a text editor last night and I agree that it would probally work better as many small files. You got to remember that each of these 230,000 asteroids has a model and texture. In the code I think the module observer has something to do with what files are loaded and when. When you approach an asteroid (if they are all in the same file), Celestia may try to load all 230,000 models and 230000 textures.

Im not sure how these were sorted? Size could have been one sort option. If size was used then there may be a large number of asteroids loaded even if they are in different regions of the asteroid belt. The file would probally work best if the asteroids were sorted by location and renumbered. Then split into smaller files? Just a guess? Of course all bets are off if you try to activate an orbit for every one. Probally bring your computer to it's knees.

Edit:On the other hand, I think there is a distance factor used when loading the models and textures. So it would probally work best by sorting in a way that seperates them somehow. Mabey size would be a good sort option.


cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #8by Rassilon » 30.05.2006, 21:45

Put 1000 asteroids in 230 ssc files and you should be ok...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Topic author
Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #9by Malenfant » 30.05.2006, 21:48

Rassilon wrote:Put 1000 asteroids in 230 ssc files and you should be ok...


Might be just a little timeconsuming, that ;). Unless maybe I can find a filesplitting program...
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #10by Rassilon » 30.05.2006, 21:56

Yeah or write a parser in C... Or wait for someone else to do it.... I think I could implement something like this in the editor I am building... but that doesnt solve your problem at this time...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 7 months
Location: Hamburg, Germany

Post #11by t00fri » 30.05.2006, 21:58

It takes only about 5-10 PERL statements to generate a MUCH smaller file containing only asteroids above a certain desired Radius, for example.

It would have been much better to leave the albedo as it was in the published catalog. One could then also use the albedo as a selection criterion and boost the values LATER for better visibility.

The present loading is of course very slow since an efficient octree type culling mechanism is (still) missing for asteroids.

Bye Fridger
Last edited by t00fri on 30.05.2006, 22:04, edited 1 time in total.
Image

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #12by Rassilon » 30.05.2006, 22:02

t00fri wrote:It takes about 5-10 PERL statements to generate a MUCH smaller file containing only asteroids above a certain desired Radius, for example.

It would have been much better to leave the albedo as it was in the published catalog. One could then also use the albedo as a selection criterion and boost the values LATER for better visibility.

Bye Fridger


What he said...

Generate maybe only a few thousand asteroids with that builder in addons section and hike up the radius and albedo... Also you could overlay a semi-transparent ring model around the sun using dsc code to give it the appearence of an asteroid belt along with the few thousand models I mentioned before...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Johaen
Posts: 341
Joined: 14.01.2006
With us: 18 years 10 months
Location: IL, USA

Re: Loading huge ssc files

Post #13by Johaen » 30.05.2006, 22:15

Malenfant wrote:... should I have just left it for an hour or so?!


Just to test this, during lunch I DLed the file, put it in Celestia and let it attempt to start up while I went back to work for the rest of the day. I don't know how long it took, but it did eventually load up. Celestia was using 500k or so memory, and was running at .4~.5 FPS. I normally get 15-20 FPS while traveling in the solor system.

Just thought I'd post these results. :)

Paolo
Posts: 502
Joined: 23.09.2002
With us: 22 years 2 months
Location: Pordenone/Italy

Post #14by Paolo » 31.05.2006, 06:59

Rassilon wrote:.... I think I could implement something like this in the editor I am building...


Hello Rassilon

Perhaps I've missed something in the past.
Can you please explain this a little bit more?

Kind regards
Remember: Time always flows, it is the most precious thing that we have.
My Celestia - Celui

Rassilon
Posts: 1887
Joined: 29.01.2002
With us: 22 years 9 months
Location: Altair

Post #15by Rassilon » 02.06.2006, 21:10

Paolo wrote:
Rassilon wrote:.... I think I could implement something like this in the editor I am building...

Hello Rassilon

Perhaps I've missed something in the past.
Can you please explain this a little bit more?

Kind regards


I will probably add a way to create an asteroid belt randomly similar to the cluster generator... I will also try to mirror what the cluster generator does and have it create star clusters and even galaxy shaped star clusters... if there will ever be a time we can add stars to galaxies in Celestia it will be there...
I'm trying to teach the cavemen how to play scrabble, its uphill work. The only word they know is Uhh and they dont know how to spell it!

Hunter Parasite
Posts: 265
Joined: 18.09.2005
With us: 19 years 2 months
Location: CT

Post #16by Hunter Parasite » 02.06.2006, 21:17

I avoid downloading large files like the asteroid one you're talking about or the 1 or 2 million star expanision. Those, if you have a slow computer, can 'overencumber', or even freeze your computer because of so much data you're loading. It's like force-feeding your dog.


Return to “Development”