World Size Check

Introduction

An oversized world is a world that uses a lot of data storage. A world that is oversized, or takes up too much data storage can result in difficulties/slowness loading into the game, or outright instability while playing.

We explain why world size matters, how to check world size, and resolve any issues with it below.

Why world size matters

World size mattes because users may start to see increased loading times around the 30+ MB mark. This is because Foundry VTT sends the world databases that make up this size to each player on every load (to make a complicated story short). This can disrupt players loading in, even on faster internet connections. If your world becomes large enough (100+ MB), you may even see some instability, or outright crashing of the world.

Checking world size

Checking world size is a little complicated, since some files (such as the fog databases) do not increase loading time for your games. However, a good rule of thumb for evaluating your world size is:

Normal: 5-20MB
Large: 30-50MB
Extreme: Greater than 50MB

We explain how to check for these sizes below.

Checking on The Forge

First, you’ll want to evaluate if your world’s size is a potential issue. You can do this on The Forge via the following steps:

  1. Navigate to your Forge setup menu: The Forge
  2. Click “View Data Storage”.
  3. Take a look at the “Worlds” tab, as depicted below

Sometimes, a world can be larger while in use, as it is normal for database sizes to swell while a game is active. However, if a game is not currently active, and your world size is extreme (greater than 50MB), there could be an issue.

Checking locally

We only advise checking locally if you are certain there is a problem with your world, and that it will require action outside of editing it within the world. This is usually due to a module problem (explained below). You can check a world’s size locally by following the steps below.

  1. Navigate to the Forge’s Setup Menu.
  2. Click “Export World(s)”
  3. Unzip the zip file that is downloaded.
  4. Navigate to the unzipped folder.
    image
  5. Navigate to the “data” folder, which contains the db files of the FoundryVTT world
  6. Right click on the folder, and check its properties (in Windows) to see the total file size inside. This will tell you whether the world is too large.

Of course, as mentioned previously, world/data/fog does not impact world loading times or stability.

What causes world size issues?

Before fixing the world size problem, you should figure out what caused it. There are usually three causes for world size issues.

Excessive “entities” (actors, scenes, items, etc.)

If you have too many scenes, items, or actors within your world, this can cause world size issues. This usually only occurs if you have hundreds of items, actors, or scenes directly in your world. This is pretty self-explanatory to check for (see how many of them are in your world), and is usually pretty easy to fix- we explain how to do so in the fixing section, below.

Excessive chat size

Chat size for a world can swell over time, especially when modules or excessive logic/data within chat messages are involved. If your chat has not been cleared in many months, and you have regular sessions, this could be the issue.

Module issues/conflicts (only for pre-V11 worlds)

The second cause of bloated world sizes is due to modules, where due to a bug or conflict with another module, the module will jam garbage into one (or more) of the world database files. This can result into worlds that balloon from a nice, safe 5-10 MB up to and in excess of 500 MB.

Checking locally to find the cause

To determine for sure which is the issue, you can check your db files locally. To do so:

  1. Navigate to the Forge’s Setup Menu.
  2. Click “Export World(s)”
  3. Unzip the zip file that is downloaded.
  4. Navigate to the unzipped folder.
    image
  5. Navigate into the “data” folder, which contains the db files of the FoundryVTT world
  6. Check each folder for a .db file that appears excessively large

IMPORTANT NOTE: Fog.db will be large simply by its design (it’s storing the Fog of War exploration for all players). A larger fog.db file will usually not increase loading times, and does not negatively affect overall world performance. You can slim fog.db down by moving Scenes you don’t need into Compendiums, or disabling “Fog of War Exploration” for scenes you don’t need it on.

In the above case, it appears the chat.db (as of version 10, this is now messages.db) is getting pretty large. In order to help increase loading speeds, it would be a good idea to clear the chat log in Foundry VTT to improve them.

In other cases, it might be the actors.db, or items.db, due to excessive imports/creation of items/actors, or module issues. Either way, we explain how to fix it all below.

Fixing this

Now that you’ve determined the issue/problematic .db file, you can now fix the problem. We explain how to address each potential issue below:

Fixing an enormous chat log

If the world will still load in, however slowly:

  1. Load into the world.
  2. Navigate to the bottom right of your chat window.
  3. Select the “Trash” or “Bin” icon.
  4. You will receive a confirmation menu, asking if you truly wish to delete the world. Select, and confirm yes. The chat will now be cleared.

If the world won’t load in at all:

  1. Navigate to the Forge’s Setup Menu.
  2. Click “Export World(s)”.
  3. Unzip the world. Make a backup of your world at this point, just in case you accidentally delete something important.
  4. Delete the chat.db file.
  5. Use “Summon Import Wizard” here: The Forge to re-upload the world.

Fixing world size due to excessive actors/items/etc.

  1. Create a compendium or compendiums within the world, or use The Forge’s shared compendium tool to create a compendium module. If you do the latter, make sure to enable it after creation.
  2. Move actors/scenes/items you no longer actively required into compendiums. Continue doing so until you have moved everything you no longer actively require.
  3. Close/shutdown the server once you are done, via The Forge’s My Foundry menu.
  4. Check your world size again, to confirm it has been sufficiently reduced. If not, repeat steps 2-4 until complete.

Fixing a .db file due to module issues (only for pre-V11 worlds)

  1. Navigate to the Forge’s Setup Menu.
  2. Click “Export World(s)”
  3. Unzip the exported zip file. Make a backup of your world at this point, just in case you accidentally delete something important.
  4. Use a text editor (like Notepad++) to find the offending section (typically a massive repeat of something, like commas, or 0,0,0,0,0,0,0,0,0,0)
  5. Delete the offending repeating information
  6. Use “Summon Import Wizard” here: The Forge to re-upload the world.

Fixing via CLI

For developers and content creators who have a reason for wanting to edit the .db files directly, we would recommend looking into the official Foundry VTT CLI, which support unpacking of .db files to .json files, and then re-packing them to LevelDB. You can find it here.

2 Likes

Hi Mr. Aeristoka, thanks for drawing attention to this!. I noticed the monsters, spells and items in my world in DDB compendium represent more than 10MB. I imported all this using Mr Primates DDB Muncher and I really don’t need ALL the monsters stored in the world I am playing. Will it help to delete my DDB Monster compendium, and then import with Mr Primate’s Muncher ONLY the monsters I am using?

If things are in Compendiums, that’s just fine. Compendiums don’t affect World-loading in the same way the other Databases do.

2 Likes

I exported my game world for inspection and discovered that its data folder is ~28 MB. However, the individual files in the data folder are fairly even in size:

  • actors.db = 1.1 Mb
  • chat.db = 4.3 Mb
  • combat.db = 1 kb
  • fog.db = 4.5 Mb
  • folders.db = 7 kb
  • items.db = 5.7 Mb
  • journal.db = 6.9 Mb
  • macros.db = 16 kb
  • playlists.db = 18 kb
  • scenes.db = 3.6 Mb
  • settings.db = 92 kb
  • tables.db = 1.6 Mb
  • users.db = 6 kb

Does this mean nothing is especially excessive and my “huge” game world just is what it is? Or is there optimization in store?

The first thing I notice, you have TONS of Items & Journals. FoundryVTT itself (no matter where you host) chokes on too many Items/Actors/Journal Entries, so I’d say clean that out a bit for things to work better (you might be ok for the moment).

Could also be there’s some embedded base64 image in the journals/items. That could inflate the size even if the number of entities is small. :thinking:

Thanks! (And @kakaroto too.) I’ll examine closer and see what’s up.

Thanks everyone for this! My game slowed to a crawl (and right after me upgrading my internet connection)! Found out chat.db was around 300M! Running smoothly after applying #aeristoka 's cure above…

2 Likes

Very happy to hear this! Definitely nice to hear that it’s helping people :smiley:

This is a very helpful post! My “scenes.db” file is nearly 5 MB on its own; however, there is only one scene (with a single 3.36 MB map). What else is stored in that scene.db? My map has walls, journal entries (only two with very small image files attached) and three “sound file” pins. Could that be what is choking the connection for two of my players?

To be fair, those two players are both on Chromebooks.

That’s not too terribly bad for a world size, or a scenes.db really, so it’s likely something else. That said, if it really is one scene in that scenes.db, open it up (with something like NotePad++) and see what it contains in there, that is absurd for one scene.

I’ll shamelessly plug another of my FAQs for things that might slow things down: Trouble with Modules

So I opened it up with Notepad++ and it’s just a ton of code (length 5,060,766 lines: 37). Is there a special formating that will allow me to see the important items?

probably a JSON Pretty Printer (just Google “JSON Pretty Print”), it sounds like your scene might have a base64 encoded Image as the background then, instead of an actual image.

I am actually going through everything and moving all unneeded content into Compendiums. I will let you know if that reduces the size significantly.

How do we know how much of the above world size or .db sizes are in compendiums?

You can check that by going to “Select data content to delete” and modules.

If you want to check how much is in a compendium of a world, export it as shown, and look at the “packs” folder.

Ok thanks.
So as I understand it then, none of the .db content in the data folder is in compendiums? i.e. all that you see there is data that is loaded upon entering the game?

Yes, I do believe so.

That is correct, yes. Data folder for a world is the “world db files”, the “Packs” folder contains compendium db files.

HELLO!! Yesterday during our session the whole game froze making me reboot my PC it has happened twice in a row. So i was sent here for help. I read the above and now i have deleted the chat logs, moved all no needed scenes and journals and items and players into compendiums but I still show massive scene and fog size files… i assume the fog is the fog of war but what happens if I delete it?

world size