comm_log key in the savefile

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

comm_log key in the savefile

Post by Cmdr Wyvern »

For some reason that just isn't clear to me, Oolite saves all the comm messages you receive in flight in your savefile, in an array under the <comm_log> key.
It doesn't seem to serve any purpose; those saved messages can't be retrieved ingame, and the array grows huge after a few saves, making the file larger and larger, and taking longer to load. (And possibly increasing the chances of corrupting the file.)

I've taken to opening the savefile and deleting the comm_log array before starting a session. Clearing the array out doesn't seem to do any harm.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Well… on a Mac (with OS X 10.4 or later), you can search for games by comm log content. Apart from that, only the last few lines are useful. I wouldn’t qualify it as “huge”, though.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

Oh! I wouldn't know what the comms record does on a Mac, not having one and all. But on Windows it's pretty useless.

And yes, it does grow to massive proportions. After five consecutive saves, there's well over a hundred lines of comms chatter in the array, especially if you have talkative ship OXPs like Frogs, Hoopys, Boyracers and Hognoses.
I tend to apply the golden rule and save on docking.
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

A hundred lines is not “massive”. In fact, it reasonably counts as “rather small”. And as it happens, Oolite limits the length to 200 lines.

I’m not sure why Giles decided to keep that many lines, but I would guess it’s to aid debugging. The reason it’s there at all is that you can call up the comm log by pressing a key (default: `). Anyway, the cost of loading those 200 lines is very, very small –probably a fraction of a millisecond – whereas setting up the player ship and resetting the universe can take a few seconds. Any speed impact you think you’re seeing is a false correlation.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Ahruman wrote:
The reason it’s there at all is that you can call up the comm log by pressing a key (default: `).
But for that purpose the last ten or so lines would be enough, as the comm log doesn't have more space.

And after you opened a save-file the comm log is empty anyway, so the last lines from the array in the save file are not loaded again.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
But for that purpose the last ten or so lines would be enough, as the comm log doesn't have more space.
Yes, I said that.
Commander McLane wrote:
And after you opened a save-file the comm log is empty anyway, so the last lines from the array in the save file are not loaded again.
That’d be a bug, I suspect.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

(Oops, got distracted by other bits of the intertubes)

As it turns out, putting the saved comm log back into the visible comm log would be problematic since colour and alignment information is not saved. On the other hand, since the overhead of keeping the comm log in the saved game is in fact minimal, and it has potential uses, I’m leaving it in (but reducing it to between 100 and 125 lines).
Post Reply