Page 1 of 1

OXP memory impact.

Posted: Mon Feb 02, 2009 1:30 pm
by Gimi
Installing expansion packs....

I have just reinstalled Oolite (after encountering Vista virtual store problems which also can effect save games).

Installed to c:/oolite and no problems so far. (Actually makes it much easier to work with oxp's as UAC no longer complains.)

I decided to do a rather careful selection of OXP's to adapt the game to what I want. So my question.

Will an OXP that only impacts galaxy 4, load and take up memory when I am in galaxy 1, and if so any significant amounts. Right now I only have OXP's related to galaxy one or all galaxies, plus the usual eye candy that I want installed.

Posted: Mon Feb 02, 2009 1:37 pm
by Sarin
I really dunno. Tho, memory doesn't look like a problem unless you have really big OXPs (like RS), on my junk (Athlon 2100+, 512 RAM, 128 MB Radeon 9600, WinXP) I made also a "selection"....well, ended with total of 42 various OXPs. But it doesn't seem to have a big impact on performance.

Posted: Mon Feb 02, 2009 1:41 pm
by Thargoid
In part it will depend on how they're written. If they have scripts, those will all get run, but if they should only affect G4 then the first line should be if(!galaxyNumber == 3) {return;} or somesuch equivalent to stop it going any further.

Doing that will take some (small) amount of time and memory, but if the scripting hasn't been done well then more of the script may be processed, and that will take more up.

Also if the OXP adds ships and suchlike, then that too will take up space in memory even though those ships may never be seen in-game unless you end up in G4.

Posted: Mon Feb 02, 2009 1:43 pm
by Gimi
Sarin wrote:
I really dunno. Tho, memory doesn't look like a problem unless you have really big OXPs (like RS), on my junk (Athlon 2100+, 512 RAM, 128 MB Radeon 9600, WinXP) I made also a "selection"....well, ended with total of 42 various OXPs. But it doesn't seem to have a big impact on performance.
I play on a laptop (gaming laptop, but still a laptop). Also I use Vista, so performance can be an issue. Haven't had any problems yet, but it can't harm performance to leave OXP's out when I don't need them, while it can harm performance to leave them in, hence my question. Also, my system supports shaders, and to much of that and things start to get noisy (system fan), but it's worth it.

Re: OXP memory impact.

Posted: Mon Feb 02, 2009 1:46 pm
by Commander McLane
Gimi wrote:
Will an OXP that only impacts galaxy 4 load and take up memory when I am in galaxy 1, and if so any significant amounts.
Yes, it will. Everything in your AddOns folder will be loaded. Although I can't tell you how much memory it will use. This will mainly depend on which kind of OXP it is. If it adds lots of ships only in Galaxy 4, then I think the models and textures will also (wastefully) be loaded if you're still in Galaxy 1.

Also note that it's not only about memory: Every world-script in every OXP will be executed, as long as it is in your AddOns folder. Therefore on every JS event and on every tickle the Galaxy 4-script will be checked out, which of course takes time, even if the script won't actually do anything outside Galaxy 4.

Re: OXP memory impact.

Posted: Mon Feb 02, 2009 1:49 pm
by Gimi
Yes, it will. Everything in your AddOns folder will be loaded. Although I can't tell you how much memory it will use. This will mainly depend on which kind of OXP it is. If it adds lots of ships only in Galaxy 4, then I think the models and textures will also (wastefully) be loaded if you're still in Galaxy 1.

Also note that it's not only about memory: Every world-script in every OXP will be executed, as long as it is in your AddOns folder. Therefore on every JS event and on every tickle the Galaxy 4-script will be checked out, which of course takes time, even if the script won't actually do anything outside Galaxy 4.
Thank you for clearing up that mystery. It is as I suspected, and I will continue to leave OXP's out until they become relevant.

Posted: Mon Feb 02, 2009 2:24 pm
by Frame
This sort of gives me an idea for suggestions

Code: Select all

scriptWorksInGalaxy = 0xFF
Means it works in all 8 galaxies.(8 bits)

It would work bitwise... so that you have to add up the bits for the galaxies

Posted: Mon Feb 02, 2009 2:26 pm
by DaddyHoggy
You can also take out OXPs that stop being relevant - when I leave G1 this time (new pilot) I will remove Lave, Diso, Long way round, Tianve and Tionsla Graveyard oxps - although Asteroid Storm will stay because although the mission is G1 specific the effect is oolite-wide.

Posted: Mon Feb 02, 2009 4:40 pm
by Eric Walch
DaddyHoggy wrote:
..although Asteroid Storm will stay because although the mission is G1 specific the effect is oolite-wide.
Asteroid storm is one of the few that completely shuts the mission part off when in an other galaxy. It deletes all its active handlers and only restores them on loading a stored game. Kaks did this because people will be using it, even after mission ending, because of the general added asteroids.

Posted: Mon Feb 02, 2009 4:57 pm
by Gimi
Asteroid storm is one of the few that completely shuts the mission part off when in an other galaxy. It deletes all its active handlers and only restores them on loading a stored game. Kaks did this because people will be using it, even after mission ending, because of the general added asteroids.
Which sounds like good programming practise to me.
Asteroid storm was going to stay in anyway. It adds variety and atmosphere to the game, and I like the asteroids.

Don't know if it is feasible, but maybe looking at the different OXP's and implementing same practise in the mission and location specific eye candy OXP's would be a good idea. Big job though.