Mod load time

Its the _Civ4Config file. In your bts file, you'll see a shortcut to it... double click on that and it'll open it in notepad. Scroll down to where it says:


; Disable caching of xml and file system (may slow initialization)
DisableCaching = 0

and change the 0 to a 1. It will improve performance but slow loading a bit. AIAndy is apparently changing some things in regards to this, most of which I'm not understanding fully. My only problem with caching MORE, especially if the mod makes this compulsory, is that from my limited understanding, isn't that going to make it harder for computers with less ram to play at all? I understand I could be completely wrong, but doesn't caching generally mean that we're loading more fixed assumptions into the ram that needs to be held there, limiting ram for other application?
 
Its the _Civ4Config file. In your bts file, you'll see a shortcut to it... double click on that and it'll open it in notepad. Scroll down to where it says:


; Disable caching of xml and file system (may slow initialization)
DisableCaching = 0

and change the 0 to a 1. It will improve performance but slow loading a bit. AIAndy is apparently changing some things in regards to this, most of which I'm not understanding fully. My only problem with caching MORE, especially if the mod makes this compulsory, is that from my limited understanding, isn't that going to make it harder for computers with less ram to play at all? I understand I could be completely wrong, but doesn't caching generally mean that we're loading more fixed assumptions into the ram that needs to be held there, limiting ram for other application?

The RAM increase should not be an issue, as the Viewports will reduce memory usage by 30-60%.
 
Its the _Civ4Config file. In your bts file, you'll see a shortcut to it... double click on that and it'll open it in notepad. Scroll down to where it says:


; Disable caching of xml and file system (may slow initialization)
DisableCaching = 0

and change the 0 to a 1. It will improve performance but slow loading a bit. AIAndy is apparently changing some things in regards to this, most of which I'm not understanding fully. My only problem with caching MORE, especially if the mod makes this compulsory, is that from my limited understanding, isn't that going to make it harder for computers with less ram to play at all? I understand I could be completely wrong, but doesn't caching generally mean that we're loading more fixed assumptions into the ram that needs to be held there, limiting ram for other application?
No, the information that ends up in the process is the same as what would be read from the XML. It only caches the resulting data in a binary format on disk for faster loading when nothing in the XML has changed.
That is something that BtS does itself but for some reason it ends up deactivated regardless of the setting of that switch.
 
So that sounds really good. But I'm wondering then why caching currently causes so many MAFs on weaker computers. Could you offer me some insight on that matter?
 
So that sounds really good. But I'm wondering then why caching currently causes so many MAFs on weaker computers. Could you offer me some insight on that matter?
We don't know what exactly Civ is caching in those cases. It can only be some kind of file caching as caching the XML has never been working for C2C.
 
In other words, the problem is in the core and we don't know but we can resolve it for C2C without worrying about adding further problems then?
 
In other words, the problem is in the core and we don't know but we can resolve it for C2C without worrying about adding further problems then?
I just write and read my own cache so I have full control over that part. The Civ exe will still do the file caching it does (which probably involves some FPK caching) but it is no more involved in the attempts at XML caching.
 
Ok. Is there anything I need to keep in mind when creating tags then? I wonder if I'm going to do a merge here soon and get really confused by how you've changed something in regards to this caching stuff.
 
Ok. Is there anything I need to keep in mind when creating tags then? I wonder if I'm going to do a merge here soon and get really confused by how you've changed something in regards to this caching stuff.
Well, the important thing is to add the tags to the serializations in the info classes that have them (the read and write methods that take a stream).
 
Well, the important thing is to add the tags to the serializations in the info classes that have them (the read and write methods that take a stream).

Not all are currently I'm pretty sure.
 
Probably, but hopefully those will surface fast as bugs when a cached load is done.

Very fast in many cases, because I don't think that when I changed the storage of many of the arrays (modifiers etc) to just be a NULL pointer if all elements are default, that I changed the C2C-unused cache serialisation routines, so they will likely just fault. Since that was one of the first things I did on C2C (and therefore Civ) it was well before I understood the serialization, so I just wouldn't have noticed those routines needed changing at the time I suspect.
 
Very fast in many cases, because I don't think that when I changed the storage of many of the arrays (modifiers etc) to just be a NULL pointer if all elements are default, that I changed the C2C-unused cache serialisation routines, so they will likely just fault. Since that was one of the first things I did on C2C (and therefore Civ) it was well before I understood the serialization, so I just wouldn't have noticed those routines needed changing at the time I suspect.
Yes, that was one of the major changes I had to make to the serialization routines (halfway through I realized I should have made a macro given just how many occurances of that there are).
 
A short update: I am currently testing the caching code and discovered some really weird behaviors in old code like bools that were declared as ints but were used as bools and somehow did not call the int version of the serialization functions but the overloaded bool version. On deserialization on the other hand ...
Anyway, while it is nearly finished, I won't get to pushing it to the SVN until Sunday or Tuesday evening. And I also want to write some more read and write methods for the info classes that are split to many small module files but do not have them yet.
 
Would it help if I merged all of my Wonder files together? I've got three dozen Wonders plus a few units and miscellaneous buildings and I could easily merge them into one set of files. Right now, they are all individual modules.
 
Would it help if I merged all of my Wonder files together? I've got three dozen Wonders plus a few units and miscellaneous buildings and I could easily merge them into one set of files. Right now, they are all individual modules.

Once aiandy has done the caching it won't matter, so don't worry about the module structure.
 
Would it help if I merged all of my Wonder files together? I've got three dozen Wonders plus a few units and miscellaneous buildings and I could easily merge them into one set of files. Right now, they are all individual modules.

With wonders I would leave them in modules for now as people may want to remove some of them when they play. However any which have been around for five versions or so without complaint can be merged into one file. ;)

I am going to get around to merging all those in my files into core one of these days. They have only been around for 10 versions or more.:D
 
Top Bottom